diff --git a/eng/scripts/Export-API.ps1 b/eng/scripts/Export-API.ps1 index 864c11db490c..0b27e8e3aa97 100644 --- a/eng/scripts/Export-API.ps1 +++ b/eng/scripts/Export-API.ps1 @@ -16,7 +16,7 @@ $servicesProj = Resolve-Path "$PSScriptRoot/../service.proj" $debugLogging = $env:SYSTEM_DEBUG -eq "true" $logsFolder = $env:BUILD_ARTIFACTSTAGINGDIRECTORY -$diagnosticArguments = ($debugLogging -and $logsFolder) ? "/binarylogger:$logsFolder/exportapi.binlog" : "" +$diagnosticArguments = "/binarylogger:$logsFolder/exportapi.binlog" dotnet build /t:ExportApi /p:RunApiCompat=false /p:InheritDocEnabled=false /p:GeneratePackageOnBuild=false /p:Configuration=Release /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:IncludeTests=false /p:Scope="$ServiceDirectory" /p:SDKType=$SDKType /restore $servicesProj $diagnosticArguments diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.net8.0.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.net8.0.cs index 958788e04eb8..59867f87764d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.net8.0.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.net8.0.cs @@ -2,10 +2,18 @@ namespace Azure.ResourceManager.AppContainers { public static partial class AppContainersExtensions { + public static Azure.ResourceManager.AppContainers.AppResiliencyResource GetAppResiliencyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetAvailableWorkloadProfiles(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetAvailableWorkloadProfilesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetBillingMeters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetBillingMetersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuilderResource GetBuilderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetBuilderResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetBuilderResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuilderResourceCollection GetBuilderResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetBuilderResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetBuilderResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuildResource GetBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetContainerApp(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetContainerAppAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppAuthConfigResource GetContainerAppAuthConfigResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -51,10 +59,16 @@ public static partial class AppContainersExtensions public static Azure.ResourceManager.AppContainers.ContainerAppCollection GetContainerApps(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetContainerApps(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetContainerAppsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsBuildResource GetContainerAppsBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppSourceControlResource GetContainerAppSourceControlResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsPatchResource GetContainerAppsPatchResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetCustomDomainVerificationId(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetCustomDomainVerificationIdAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyResource GetDaprComponentResiliencyPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprSubscriptionResource GetDaprSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.DotNetComponentResource GetDotNetComponentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.JavaComponentResource GetJavaComponentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.LabelHistoryResource GetLabelHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.LogicAppResource GetLogicAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSessionPool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sessionPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -66,12 +80,199 @@ public static partial class AppContainersExtensions public static Azure.Pageable GetUsages(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetUsagesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class AppResiliencyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppResiliencyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AppResiliencyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AppResiliencyData() { } + public Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy CircuitBreakerPolicy { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.HttpConnectionPool HttpConnectionPool { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy HttpRetryPolicy { get { throw null; } set { } } + public int? MaxConnections { get { throw null; } set { } } + public int? TcpRetryMaxConnectAttempts { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.TimeoutPolicy TimeoutPolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AppResiliencyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppResiliencyResource() { } + public virtual Azure.ResourceManager.AppContainers.AppResiliencyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string appName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class AzureResourceManagerAppContainersContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureResourceManagerAppContainersContext() { } public static Azure.ResourceManager.AppContainers.AzureResourceManagerAppContainersContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class BuilderResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuilderResource() { } + public virtual Azure.ResourceManager.AppContainers.BuilderResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string builderName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildResource(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildResourceAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuildResourceCollection GetBuildResources() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuilderResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuilderResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppContainers.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppContainers.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BuilderResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuilderResourceData(Azure.Core.AzureLocation location) { } + public System.Collections.Generic.IList ContainerRegistries { get { throw null; } } + public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuildResource() { } + public virtual Azure.ResourceManager.AppContainers.BuildResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string builderName, string buildName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildAuthToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildAuthTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuildResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuildResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BuildResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuildResourceData() { } + public Azure.ResourceManager.AppContainers.Models.BuildStatus? BuildStatus { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.BuildConfiguration Configuration { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage DestinationContainerRegistry { get { throw null; } set { } } + public string LogStreamEndpoint { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? ProvisioningState { get { throw null; } } + public string TokenEndpoint { get { throw null; } } + public string UploadEndpoint { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectedEnvironmentDaprComponentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedEnvironmentDaprComponentData() { } + public string ComponentType { get { throw null; } set { } } + public string DeploymentErrors { get { throw null; } } + public bool? IgnoreErrors { get { throw null; } set { } } + public string InitTimeout { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + public System.Collections.Generic.IList Secrets { get { throw null; } } + public string SecretStoreComponent { get { throw null; } set { } } + public System.Collections.Generic.IList ServiceComponentBind { get { throw null; } } + public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerAppAuthConfigCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerAppAuthConfigCollection() { } @@ -218,8 +419,8 @@ protected ContainerAppConnectedEnvironmentCollection() { } public partial class ContainerAppConnectedEnvironmentDaprComponentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerAppConnectedEnvironmentDaprComponentCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -232,11 +433,11 @@ protected ContainerAppConnectedEnvironmentDaprComponentCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ContainerAppConnectedEnvironmentDaprComponentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ContainerAppConnectedEnvironmentDaprComponentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected ContainerAppConnectedEnvironmentDaprComponentResource() { } - public virtual Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData Data { get { throw null; } } + public virtual Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -245,13 +446,13 @@ protected ContainerAppConnectedEnvironmentDaprComponentResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerAppConnectedEnvironmentData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -365,14 +566,13 @@ public partial class ContainerAppDaprComponentData : Azure.ResourceManager.Model { public ContainerAppDaprComponentData() { } public string ComponentType { get { throw null; } set { } } - public string DeploymentErrors { get { throw null; } } public bool? IgnoreErrors { get { throw null; } set { } } public string InitTimeout { get { throw null; } set { } } public System.Collections.Generic.IList Metadata { get { throw null; } } - public Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Scopes { get { throw null; } } public System.Collections.Generic.IList Secrets { get { throw null; } } public string SecretStoreComponent { get { throw null; } set { } } + public System.Collections.Generic.IList ServiceComponentBind { get { throw null; } } public string Version { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -386,6 +586,7 @@ public partial class ContainerAppData : Azure.ResourceManager.Models.TrackedReso public ContainerAppData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration Configuration { get { throw null; } set { } } public string CustomDomainVerificationId { get { throw null; } } + public string DeploymentErrors { get { throw null; } } public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } public System.Uri EventStreamEndpoint { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation ExtendedLocation { get { throw null; } set { } } @@ -400,6 +601,7 @@ public ContainerAppData(Azure.Core.AzureLocation location) { } [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release", false)] public System.Collections.Generic.IReadOnlyList OutboundIPAddresses { get { throw null; } } public System.Collections.Generic.IReadOnlyList OutboundIPAddressList { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchingMode? PatchingMode { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? RunningStatus { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate Template { get { throw null; } set { } } @@ -569,9 +771,11 @@ public ContainerAppJobData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration Configuration { get { throw null; } set { } } public string EnvironmentId { get { throw null; } set { } } public string EventStreamEndpoint { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList OutboundIPAddresses { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.JobRunningState? RunningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate Template { get { throw null; } set { } } public string WorkloadProfileName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -654,7 +858,10 @@ protected ContainerAppJobExecutionCollection() { } public partial class ContainerAppJobExecutionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerAppJobExecutionData() { } + public System.Collections.Generic.IReadOnlyList DetailedStatusReplicas { get { throw null; } } public System.DateTimeOffset? EndOn { get { throw null; } } + public string Message { get { throw null; } } + public string Reason { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? Status { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate Template { get { throw null; } } @@ -708,12 +915,16 @@ protected ContainerAppJobResource() { } public virtual Azure.AsyncPageable GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resume(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResumeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation StopMultipleExecutions(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> StopMultipleExecutionsAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Suspend(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SuspendAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.ContainerAppJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -909,6 +1120,9 @@ protected ContainerAppManagedEnvironmentDaprComponentResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyCollection GetDaprComponentResiliencyPolicies() { throw null; } + public virtual Azure.Response GetDaprComponentResiliencyPolicy(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDaprComponentResiliencyPolicyAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -922,23 +1136,28 @@ protected ContainerAppManagedEnvironmentDaprComponentResource() { } public partial class ContainerAppManagedEnvironmentData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppManagedEnvironmentData(Azure.Core.AzureLocation location) { } + public string AppInsightsConnectionString { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration AppLogsConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList AvailabilityZones { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration CustomDomainConfiguration { get { throw null; } set { } } public string DaprAIConnectionString { get { throw null; } set { } } public string DaprAIInstrumentationKey { get { throw null; } set { } } public string DaprVersion { get { throw null; } } public string DefaultDomain { get { throw null; } } public string DeploymentErrors { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration DiskEncryptionKeyVaultConfiguration { get { throw null; } set { } } public string EventStreamEndpoint { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string InfrastructureResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentIngressConfiguration IngressConfiguration { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } public bool? IsMtlsEnabled { get { throw null; } set { } } + public bool? IsPeerToPeerEncryptionEnabled { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public string KedaVersion { get { throw null; } } public string Kind { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration OpenTelemetryConfiguration { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } + public string PrivateLinkDefaultDomain { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1040,6 +1259,12 @@ protected ContainerAppManagedEnvironmentResource() { } public virtual Azure.Response GetContainerAppPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppPrivateEndpointConnectionCollection GetContainerAppPrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetDaprSubscription(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDaprSubscriptionAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprSubscriptionCollection GetDaprSubscriptions() { throw null; } + public virtual Azure.Response GetDotNetComponent(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDotNetComponentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DotNetComponentCollection GetDotNetComponents() { throw null; } public virtual Azure.Response GetJavaComponent(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetJavaComponentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.JavaComponentCollection GetJavaComponents() { throw null; } @@ -1217,6 +1442,9 @@ protected ContainerAppResource() { } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.AppResiliencyCollection GetAppResiliencies() { throw null; } + public virtual Azure.Response GetAppResiliency(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppResiliencyAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAuthToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAuthTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1233,11 +1461,20 @@ protected ContainerAppResource() { } public virtual Azure.Response GetContainerAppRevision(string revisionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppRevisionAsync(string revisionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppRevisionCollection GetContainerAppRevisions() { throw null; } + public virtual Azure.Response GetContainerAppsBuildResource(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerAppsBuildResourceAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceCollection GetContainerAppsBuildResources() { throw null; } public virtual Azure.Response GetContainerAppSourceControl(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppSourceControlAsync(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppSourceControlCollection GetContainerAppSourceControls() { throw null; } + public virtual Azure.Response GetContainerAppsPatchResource(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerAppsPatchResourceAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceCollection GetContainerAppsPatchResources() { throw null; } public virtual Azure.Response GetCustomHostNameAnalysis(string customHostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCustomHostNameAnalysisAsync(string customHostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.LabelHistoryCollection GetLabelHistories() { throw null; } + public virtual Azure.Response GetLabelHistory(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetLabelHistoryAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetLogicApp(string logicAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetLogicAppAsync(string logicAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.LogicAppCollection GetLogicApps() { throw null; } @@ -1281,6 +1518,7 @@ public ContainerAppRevisionData() { } public string Fqdn { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? HealthState { get { throw null; } } public bool? IsActive { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Labels { get { throw null; } } public System.DateTimeOffset? LastActiveOn { get { throw null; } } public string ProvisioningError { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? ProvisioningState { get { throw null; } } @@ -1311,6 +1549,8 @@ protected ContainerAppRevisionResource() { } public virtual Azure.Response GetContainerAppReplica(string replicaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppReplicaAsync(string replicaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppReplicaCollection GetContainerAppReplicas() { throw null; } + public virtual Azure.Response InvokeFunctionsHostFunctionsExtension(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> InvokeFunctionsHostFunctionsExtensionAsync(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RestartRevision(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RestartRevisionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppRevisionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1319,11 +1559,58 @@ protected ContainerAppRevisionResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ContainerAppsBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerAppsBuildResource() { } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string buildName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerAppsBuildResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerAppsBuildResourceCollection() { } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerAppsBuildResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerAppsBuildResourceData() { } + public Azure.ResourceManager.AppContainers.Models.BuildStatus? BuildStatus { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration Configuration { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage DestinationContainerRegistry { get { throw null; } } + public string LogStreamEndpoint { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerAppSourceControlCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerAppSourceControlCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1357,8 +1644,8 @@ protected ContainerAppSourceControlResource() { } public virtual Azure.ResourceManager.AppContainers.ContainerAppSourceControlData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = default(bool?), bool? deleteWorkflow = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = default(bool?), bool? deleteWorkflow = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppSourceControlData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1366,8 +1653,206 @@ protected ContainerAppSourceControlResource() { } Azure.ResourceManager.AppContainers.ContainerAppSourceControlData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ContainerAppsPatchResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerAppsPatchResource() { } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation Apply(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ApplyAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation SkipConfigure(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.PatchSkipConfig patchSkipConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SkipConfigureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.PatchSkipConfig patchSkipConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerAppsPatchResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerAppsPatchResourceCollection() { } + public virtual Azure.Response Exists(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerAppsPatchResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerAppsPatchResourceData() { } + public Azure.ResourceManager.AppContainers.Models.PatchProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentResiliencyPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DaprComponentResiliencyPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DaprComponentResiliencyPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprComponentResiliencyPolicyData() { } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration InboundPolicy { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration OutboundPolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentResiliencyPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DaprComponentResiliencyPolicyResource() { } + public virtual Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DaprSubscriptionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DaprSubscriptionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DaprSubscriptionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionData() { } + public Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig BulkSubscribe { get { throw null; } set { } } + public string DeadLetterTopic { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + public string PubsubName { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes Routes { get { throw null; } set { } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + public string Topic { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DaprSubscriptionResource() { } + public virtual Azure.ResourceManager.AppContainers.DaprSubscriptionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DotNetComponentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DotNetComponentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DotNetComponentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DotNetComponentData() { } + public Azure.ResourceManager.AppContainers.Models.DotNetComponentType? ComponentType { get { throw null; } set { } } + public System.Collections.Generic.IList Configurations { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList ServiceBinds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DotNetComponentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DotNetComponentResource() { } + public virtual Azure.ResourceManager.AppContainers.DotNetComponentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class JavaComponentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -1416,6 +1901,49 @@ protected JavaComponentResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.JavaComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.JavaComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class LabelHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected LabelHistoryCollection() { } + public virtual Azure.Response Exists(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class LabelHistoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LabelHistoryData() { } + public System.Collections.Generic.IReadOnlyList LabelHistoryRecords { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LabelHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected LabelHistoryResource() { } + public virtual Azure.ResourceManager.AppContainers.LabelHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string labelName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class LogicAppCollection : Azure.ResourceManager.ArmCollection { protected LogicAppCollection() { } @@ -1431,6 +1959,7 @@ protected LogicAppCollection() { } public partial class LogicAppData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LogicAppData() { } + public System.BinaryData Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.LogicAppData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1447,6 +1976,8 @@ protected LogicAppResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeployWorkflowArtifacts(Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployWorkflowArtifactsAsync(Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetLogicAppWorkflowEnvelope(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1454,6 +1985,8 @@ protected LogicAppResource() { } public virtual Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeCollection GetLogicAppWorkflowEnvelopes() { throw null; } public virtual Azure.Response GetWorkflowsConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWorkflowsConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Invoke(string xMsLogicAppsProxyPath, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod xMsLogicAppsProxyMethod, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> InvokeAsync(string xMsLogicAppsProxyPath, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod xMsLogicAppsProxyMethod, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.LogicAppData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.LogicAppData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1479,9 +2012,10 @@ protected LogicAppWorkflowEnvelopeCollection() { } } public partial class LogicAppWorkflowEnvelopeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogicAppWorkflowEnvelopeData() { } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind? Kind { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties Properties { get { throw null; } set { } } + internal LogicAppWorkflowEnvelopeData() { } + public string Kind { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1530,6 +2064,7 @@ public SessionPoolData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList ManagedIdentitySettings { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.McpServerSettings McpServerSettings { get { throw null; } set { } } public int? NodeCount { get { throw null; } } public System.Uri PoolManagementEndpoint { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.PoolManagementType? PoolManagementType { get { throw null; } set { } } @@ -1537,6 +2072,7 @@ public SessionPoolData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration ScaleConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? SessionNetworkStatus { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus TemplateUpdateStatus { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.SessionPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1555,10 +2091,14 @@ protected SessionPoolResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sessionPoolName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response FetchMcpServerCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> FetchMcpServerCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RotateMcpServerCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RotateMcpServerCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.SessionPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1575,6 +2115,9 @@ namespace Azure.ResourceManager.AppContainers.Mocking public partial class MockableAppContainersArmClient : Azure.ResourceManager.ArmResource { protected MockableAppContainersArmClient() { } + public virtual Azure.ResourceManager.AppContainers.AppResiliencyResource GetAppResiliencyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuilderResource GetBuilderResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuildResource GetBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppAuthConfigResource GetContainerAppAuthConfigResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppConnectedEnvironmentCertificateResource GetContainerAppConnectedEnvironmentCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppConnectedEnvironmentDaprComponentResource GetContainerAppConnectedEnvironmentDaprComponentResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1600,8 +2143,14 @@ protected MockableAppContainersArmClient() { } public virtual Azure.ResourceManager.AppContainers.ContainerAppReplicaResource GetContainerAppReplicaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppResource GetContainerAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppRevisionResource GetContainerAppRevisionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsBuildResource GetContainerAppsBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppSourceControlResource GetContainerAppSourceControlResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsPatchResource GetContainerAppsPatchResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyResource GetDaprComponentResiliencyPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprSubscriptionResource GetDaprSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DotNetComponentResource GetDotNetComponentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.JavaComponentResource GetJavaComponentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.LabelHistoryResource GetLabelHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.LogicAppResource GetLogicAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.SessionPoolResource GetSessionPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1609,6 +2158,9 @@ protected MockableAppContainersArmClient() { } public partial class MockableAppContainersResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableAppContainersResourceGroupResource() { } + public virtual Azure.Response GetBuilderResource(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuilderResourceAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuilderResourceCollection GetBuilderResources() { throw null; } public virtual Azure.Response GetContainerApp(string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppAsync(string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetContainerAppConnectedEnvironment(string connectedEnvironmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1632,6 +2184,8 @@ protected MockableAppContainersSubscriptionResource() { } public virtual Azure.AsyncPageable GetAvailableWorkloadProfilesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetBillingMeters(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetBillingMetersAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetBuilderResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetBuilderResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetContainerAppConnectedEnvironments(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetContainerAppConnectedEnvironmentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetContainerAppJobs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1673,6 +2227,7 @@ public partial class AppContainerResources : System.ClientModel.Primitives.IJson public AppContainerResources() { } public double? Cpu { get { throw null; } set { } } public string EphemeralStorage { get { throw null; } } + public double? Gpu { get { throw null; } set { } } public string Memory { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.AppContainerResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1700,18 +2255,30 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ArmAppContainersModelFactory { - public static Azure.ResourceManager.AppContainers.Models.AppContainerResources AppContainerResources(double? cpu = default(double?), string memory = null, string ephemeralStorage = null) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties azureFile = null, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState?), string deploymentErrors = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.AppContainerResources AppContainerResources(double? cpu, string memory, string ephemeralStorage) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.AppContainerResources AppContainerResources(double? cpu = default(double?), string memory = null, string ephemeralStorage = null, double? gpu = default(double?)) { throw null; } + public static Azure.ResourceManager.AppContainers.AppResiliencyData AppResiliencyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.TimeoutPolicy timeoutPolicy = null, Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy httpRetryPolicy = null, int? tcpRetryMaxConnectAttempts = default(int?), Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy circuitBreakerPolicy = null, Azure.ResourceManager.AppContainers.Models.HttpConnectionPool httpConnectionPool = null, int? maxConnections = default(int?)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuilderResourceData BuilderResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState?), Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IEnumerable containerRegistries = null) { throw null; } + public static Azure.ResourceManager.AppContainers.BuildResourceData BuildResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState?), Azure.ResourceManager.AppContainers.Models.BuildStatus? buildStatus = default(Azure.ResourceManager.AppContainers.Models.BuildStatus?), Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage destinationContainerRegistry = null, Azure.ResourceManager.AppContainers.Models.BuildConfiguration configuration = null, string uploadEndpoint = null, string logStreamEndpoint = null, string tokenEndpoint = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuildToken BuildToken(string token = null, System.DateTimeOffset? expires = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData ConnectedEnvironmentDaprComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = default(bool?), string initTimeout = null, System.Collections.Generic.IEnumerable secrets = null, string secretStoreComponent = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable scopes = null, System.Collections.Generic.IEnumerable serviceComponentBind = null, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState?), string deploymentErrors = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties azureFile, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? provisioningState, string deploymentErrors) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState?), string deploymentErrors = null, Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties azureFile = null, Azure.ResourceManager.AppContainers.Models.SmbStorage smb = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppAuthConfigData ContainerAppAuthConfigData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.AppContainers.Models.ContainerAppAuthPlatform platform, Azure.ResourceManager.AppContainers.Models.ContainerAppGlobalValidation globalValidation, Azure.ResourceManager.AppContainers.Models.ContainerAppIdentityProvidersConfiguration identityProviders, Azure.ResourceManager.AppContainers.Models.ContainerAppLogin login, Azure.ResourceManager.AppContainers.Models.ContainerAppHttpSettings httpSettings) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppAuthConfigData ContainerAppAuthConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppAuthPlatform platform = null, Azure.ResourceManager.AppContainers.Models.ContainerAppGlobalValidation globalValidation = null, Azure.ResourceManager.AppContainers.Models.ContainerAppIdentityProvidersConfiguration identityProviders = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogin login = null, Azure.ResourceManager.AppContainers.Models.ContainerAppHttpSettings httpSettings = null, Azure.ResourceManager.AppContainers.Models.EncryptionSettings encryptionSettings = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppAuthToken ContainerAppAuthToken(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string token = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppAvailableWorkloadProfile ContainerAppAvailableWorkloadProfile(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppContainers.Models.ContainerAppAvailableWorkloadProfileProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeter ContainerAppBillingMeter(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties ContainerAppBillingMeterProperties(string workloadProfileCategory = null, string meterType = null, string displayName = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppCertificateData ContainerAppCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties properties = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, System.Collections.Generic.IEnumerable subjectAlternativeNames, byte[] value, string issuer, System.DateTimeOffset? issueOn, System.DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState?), string deploymentErrors = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties = null, string password = null, string subjectName = null, System.Collections.Generic.IEnumerable subjectAlternativeNames = null, byte[] value = null, string issuer = null, System.DateTimeOffset? issueOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), string thumbprint = null, bool? isValid = default(bool?), string publicKeyHash = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState, string deploymentErrors, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, System.Collections.Generic.IEnumerable subjectAlternativeNames, byte[] value, string issuer, System.DateTimeOffset? issueOn, System.DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState?), string deploymentErrors = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties = null, string password = null, string subjectName = null, System.Collections.Generic.IEnumerable subjectAlternativeNames = null, byte[] value = null, string issuer = null, System.DateTimeOffset? issueOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), string thumbprint = null, bool? isValid = default(bool?), string publicKeyHash = null, Azure.ResourceManager.AppContainers.Models.CertificateType? certificateType = default(Azure.ResourceManager.AppContainers.Models.CertificateType?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState, string password, string subjectName, System.Collections.Generic.IEnumerable subjectAlternativeNames, byte[] value, string issuer, System.DateTimeOffset? issueOn, System.DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppConnectedEnvironmentData ContainerAppConnectedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.AppContainers.Models.ContainerAppConnectedEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppConnectedEnvironmentProvisioningState?), string deploymentErrors = null, string defaultDomain = null, System.Net.IPAddress staticIP = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null) { throw null; } @@ -1726,9 +2293,11 @@ public static partial class ArmAppContainersModelFactory public static Azure.ResourceManager.AppContainers.Models.ContainerAppCustomHostnameAnalysisResult ContainerAppCustomHostnameAnalysisResult(string hostName = null, bool? isHostnameAlreadyVerified = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppDnsVerificationTestResult? customDomainVerificationTest = default(Azure.ResourceManager.AppContainers.Models.ContainerAppDnsVerificationTestResult?), Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo = null, bool? hasConflictOnManagedEnvironment = default(bool?), bool? conflictWithEnvironmentCustomDomain = default(bool?), string conflictingContainerAppResourceId = null, System.Collections.Generic.IEnumerable cNameRecords = null, System.Collections.Generic.IEnumerable txtRecords = null, System.Collections.Generic.IEnumerable aRecords = null, System.Collections.Generic.IEnumerable alternateCNameRecords = null, System.Collections.Generic.IEnumerable alternateTxtRecords = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData ContainerAppDaprComponentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string componentType, string version, bool? ignoreErrors, string initTimeout, System.Collections.Generic.IEnumerable secrets, string secretStoreComponent, System.Collections.Generic.IEnumerable metadata, System.Collections.Generic.IEnumerable scopes) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData ContainerAppDaprComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = default(bool?), string initTimeout = null, System.Collections.Generic.IEnumerable secrets = null, string secretStoreComponent = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable scopes = null, Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState?), string deploymentErrors = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData ContainerAppDaprComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = default(bool?), string initTimeout = null, System.Collections.Generic.IEnumerable secrets = null, string secretStoreComponent = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable scopes = null, System.Collections.Generic.IEnumerable serviceComponentBind = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppDaprSecret ContainerAppDaprSecret(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string managedBy = null, Azure.ResourceManager.AppContainers.Models.ContainerAppKind? kind = default(Azure.ResourceManager.AppContainers.Models.ContainerAppKind?), Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? runningStatus = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus?), Azure.Core.ResourceIdentifier managedEnvironmentId = null, Azure.Core.ResourceIdentifier environmentId = null, string workloadProfileName = null, string latestRevisionName = null, string latestReadyRevisionName = null, string latestRevisionFqdn = null, string customDomainVerificationId = null, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddressList = null, System.Uri eventStreamEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string managedBy, Azure.ResourceManager.AppContainers.Models.ContainerAppKind? kind, Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState, Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? runningStatus, Azure.Core.ResourceIdentifier managedEnvironmentId, Azure.Core.ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template, System.Collections.Generic.IEnumerable outboundIPAddressList, System.Uri eventStreamEndpoint) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string managedBy = null, Azure.ResourceManager.AppContainers.Models.ContainerAppKind? kind = default(Azure.ResourceManager.AppContainers.Models.ContainerAppKind?), Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? runningStatus = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus?), string deploymentErrors = null, Azure.Core.ResourceIdentifier managedEnvironmentId = null, Azure.Core.ResourceIdentifier environmentId = null, string workloadProfileName = null, Azure.ResourceManager.AppContainers.Models.PatchingMode? patchingMode = default(Azure.ResourceManager.AppContainers.Models.PatchingMode?), string latestRevisionName = null, string latestReadyRevisionName = null, string latestRevisionFqdn = null, string customDomainVerificationId = null, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddressList = null, System.Uri eventStreamEndpoint = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string managedBy, Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState, Azure.Core.ResourceIdentifier managedEnvironmentId, Azure.Core.ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template, System.Collections.Generic.IEnumerable outboundIPAddressList, System.Uri eventStreamEndpoint) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1742,43 +2311,247 @@ public static partial class ArmAppContainersModelFactory public static Azure.ResourceManager.AppContainers.Models.ContainerAppHttpRouteProvisioningErrors ContainerAppHttpRouteProvisioningErrors(System.DateTimeOffset? errorOccurredOn = default(System.DateTimeOffset?), string message = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport, System.Collections.Generic.IEnumerable traffic, System.Collections.Generic.IEnumerable customDomains, bool? allowInsecure, System.Collections.Generic.IEnumerable ipSecurityRestrictions, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode, Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn = null, bool? external = default(bool?), int? targetPort = default(int?), int? exposedPort = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod?), System.Collections.Generic.IEnumerable traffic = null, System.Collections.Generic.IEnumerable customDomains = null, bool? allowInsecure = default(bool?), System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity = default(Azure.ResourceManager.AppContainers.Models.Affinity?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode?), Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy = null, System.Collections.Generic.IEnumerable additionalPortMappings = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppJobData ContainerAppJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState?), string environmentId = null, string workloadProfileName = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport, System.Collections.Generic.IEnumerable traffic, System.Collections.Generic.IEnumerable customDomains, bool? allowInsecure, System.Collections.Generic.IEnumerable ipSecurityRestrictions, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode, Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy, System.Collections.Generic.IEnumerable additionalPortMappings) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn = null, bool? external = default(bool?), int? targetPort = default(int?), int? exposedPort = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod?), System.Collections.Generic.IEnumerable traffic = null, System.Collections.Generic.IEnumerable customDomains = null, bool? allowInsecure = default(bool?), System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity = default(Azure.ResourceManager.AppContainers.Models.Affinity?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode?), Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy = null, System.Collections.Generic.IEnumerable additionalPortMappings = null, Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme? targetPortHttpScheme = default(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppJobData ContainerAppJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState?), Azure.ResourceManager.AppContainers.Models.JobRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.JobRunningState?), string environmentId = null, string workloadProfileName = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppJobData ContainerAppJobData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? provisioningState, string environmentId, string workloadProfileName, Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration configuration, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate template, System.Collections.Generic.IEnumerable outboundIPAddresses, string eventStreamEndpoint) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionBase ContainerAppJobExecutionBase(string name = null, string id = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData ContainerAppJobExecutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status = default(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData ContainerAppJobExecutionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData ContainerAppJobExecutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status = default(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null, System.Collections.Generic.IEnumerable detailedStatusReplicas = null, string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutions ContainerAppJobExecutions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppMaintenanceConfigurationData ContainerAppMaintenanceConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable scheduledEntries = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateData ContainerAppManagedCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ManagedCertificateProperties properties = null) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string kind, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, System.Net.IPAddress staticIP, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, System.Collections.Generic.IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled, bool? isEnabled) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState?), string daprAIInstrumentationKey = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, System.Collections.Generic.IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = default(bool?), bool? isEnabled = default(bool?), Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentIngressConfiguration ingressConfiguration = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState?), string daprAIInstrumentationKey = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, string privateLinkDefaultDomain = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration = null, string appInsightsConnectionString = null, Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration openTelemetryConfiguration = null, bool? isZoneRedundant = default(bool?), System.Collections.Generic.IEnumerable availabilityZones = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, System.Collections.Generic.IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = default(bool?), bool? isPeerToPeerEncryptionEnabled = default(bool?), Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentIngressConfiguration ingressConfiguration = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess?), Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration diskEncryptionKeyVaultConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string kind, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, System.Net.IPAddress staticIP, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, System.Collections.Generic.IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string kind, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, System.Net.IPAddress staticIP, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, System.Collections.Generic.IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled, bool? isEnabled) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentStorageData ContainerAppManagedEnvironmentStorageData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties managedEnvironmentStorageAzureFile = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentStorageData ContainerAppManagedEnvironmentStorageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentStorageProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppNameAvailabilityResult ContainerAppNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppNameUnavailableReason? reason = default(Azure.ResourceManager.AppContainers.Models.ContainerAppNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppPrivateEndpointConnectionData ContainerAppPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateLink ContainerAppPrivateLink(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = default(bool?), bool? isStarted = default(bool?), int? restartCount = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState?), string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name, string containerId, bool? isReady, bool? isStarted, int? restartCount, Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? runningState, string runningStateDetails, string logStreamEndpoint, string execEndpoint) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = default(bool?), bool? isStarted = default(bool?), int? restartCount = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState?), string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null, string debugEndpoint = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppReplicaData ContainerAppReplicaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState?), string runningStateDetails = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable initContainers = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveOn = default(System.DateTimeOffset?), string fqdn = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, bool? isActive = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), string provisioningError = null, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState?), Azure.ResourceManager.AppContainers.Models.RevisionRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.RevisionRunningState?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveOn = default(System.DateTimeOffset?), string fqdn = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, bool? isActive = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), System.Collections.Generic.IEnumerable labels = null, string provisioningError = null, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState?), Azure.ResourceManager.AppContainers.Models.RevisionRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.RevisionRunningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.DateTimeOffset? createdOn, System.DateTimeOffset? lastActiveOn, string fqdn, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template, bool? isActive, int? replicas, int? trafficWeight, string provisioningError, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState, Azure.ResourceManager.AppContainers.Models.RevisionRunningState? runningState) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration ContainerAppsBuildConfiguration(string baseOS = null, string platform = null, string platformVersion = null, System.Collections.Generic.IEnumerable environmentVariables = null, System.Collections.Generic.IEnumerable preBuildSteps = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData ContainerAppsBuildResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState?), Azure.ResourceManager.AppContainers.Models.BuildStatus? buildStatus = default(Azure.ResourceManager.AppContainers.Models.BuildStatus?), Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage destinationContainerRegistry = null, Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration configuration = null, string logStreamEndpoint = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppSecret ContainerAppSecret(string name = null, string value = null, string identity = null, System.Uri keyVaultUri = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppSourceControlData ContainerAppSourceControlData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppSourceControlOperationState? operationState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppSourceControlOperationState?), System.Uri repoUri = null, string branch = null, Azure.ResourceManager.AppContainers.Models.ContainerAppGitHubActionConfiguration gitHubActionConfiguration = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData ContainerAppsPatchResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.PatchProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppUsage ContainerAppUsage(Azure.ResourceManager.AppContainers.Models.ContainerAppUsageUnit unit = default(Azure.ResourceManager.AppContainers.Models.ContainerAppUsageUnit), float currentValue = 0f, float limit = 0f, Azure.ResourceManager.AppContainers.Models.ContainerAppUsageName name = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppUsageName ContainerAppUsageName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppWorkloadProfileState ContainerAppWorkloadProfileState(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppWorkloadProfileStateProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerExecutionStatus ContainerExecutionStatus(string name = null, int? code = default(int?), string additionalInformation = null, string status = null) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData DaprComponentResiliencyPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration inboundPolicy = null, Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration outboundPolicy = null) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprSubscriptionData DaprSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string pubsubName = null, string topic = null, string deadLetterTopic = null, Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes routes = null, System.Collections.Generic.IEnumerable scopes = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig bulkSubscribe = null) { throw null; } + public static Azure.ResourceManager.AppContainers.DotNetComponentData DotNetComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.DotNetComponentType? componentType = default(Azure.ResourceManager.AppContainers.Models.DotNetComponentType?), Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, System.Collections.Generic.IEnumerable serviceBinds = null) { throw null; } public static Azure.ResourceManager.AppContainers.JavaComponentData JavaComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JavaComponentProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.JavaComponentProperties JavaComponentProperties(string componentType = null, Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null) { throw null; } - public static Azure.ResourceManager.AppContainers.LogicAppData LogicAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } - public static Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeData LogicAppWorkflowEnvelopeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind? kind = default(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind?), Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.LabelHistoryData LabelHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable labelHistoryRecords = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LabelHistoryRecordItem LabelHistoryRecordItem(string revision = null, System.DateTimeOffset? start = default(System.DateTimeOffset?), System.DateTimeOffset? stop = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.Status? status = default(Azure.ResourceManager.AppContainers.Models.Status?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.LogicAppData LogicAppData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData) { throw null; } + public static Azure.ResourceManager.AppContainers.LogicAppData LogicAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.BinaryData properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeData LogicAppWorkflowEnvelopeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties LogicAppWorkflowEnvelopeProperties(System.BinaryData files = null, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState? flowState = default(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState?), Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth health = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth LogicAppWorkflowHealth(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState state = Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState.Unknown, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ManagedCertificateProperties ManagedCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState?), string subjectName = null, string error = null, Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation? domainControlValidation = default(Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation?), string validationToken = null) { throw null; } - public static Azure.ResourceManager.AppContainers.SessionPoolData SessionPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier environmentId = null, Azure.ResourceManager.AppContainers.Models.ContainerType? containerType = default(Azure.ResourceManager.AppContainers.Models.ContainerType?), Azure.ResourceManager.AppContainers.Models.PoolManagementType? poolManagementType = default(Azure.ResourceManager.AppContainers.Models.PoolManagementType?), int? nodeCount = default(int?), Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration scaleConfiguration = null, System.Collections.Generic.IEnumerable secrets = null, Azure.ResourceManager.AppContainers.Models.SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration = null, Azure.ResourceManager.AppContainers.Models.CustomContainerTemplate customContainerTemplate = null, Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? sessionNetworkStatus = default(Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus?), System.Uri poolManagementEndpoint = null, Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState?), System.Collections.Generic.IEnumerable managedIdentitySettings = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.McpServerCredential McpServerCredential(string apiKey = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.McpServerSettings McpServerSettings(bool? isMcpServerEnabled = default(bool?), bool? isMcpServerApiKeyDisabled = default(bool?), string mcpServerEndpoint = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.NacosComponent NacosComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchDetails PatchDetails(string targetContainerName = null, string targetImage = null, System.DateTimeOffset lastDetectionOn = default(System.DateTimeOffset), Azure.ResourceManager.AppContainers.Models.DetectionStatus detectionStatus = default(Azure.ResourceManager.AppContainers.Models.DetectionStatus), string newImageName = null, Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer newLayer = null, Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer oldLayer = null, Azure.ResourceManager.AppContainers.Models.PatchType? patchType = default(Azure.ResourceManager.AppContainers.Models.PatchType?)) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer PatchDetailsNewLayer(string name = null, string frameworkAndVersion = null, string osAndVersion = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer PatchDetailsOldLayer(string name = null, string frameworkAndVersion = null, string osAndVersion = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchProperties PatchProperties(Azure.Core.ResourceIdentifier targetEnvironmentId = null, Azure.Core.ResourceIdentifier targetContainerAppId = null, Azure.Core.ResourceIdentifier targetRevisionId = null, Azure.ResourceManager.AppContainers.Models.PatchApplyStatus? patchApplyStatus = default(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable patchDetails = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ReplicaExecutionStatus ReplicaExecutionStatus(string name = null, System.Collections.Generic.IEnumerable containers = null) { throw null; } + public static Azure.ResourceManager.AppContainers.SessionPoolData SessionPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier environmentId = null, Azure.ResourceManager.AppContainers.Models.ContainerType? containerType = default(Azure.ResourceManager.AppContainers.Models.ContainerType?), Azure.ResourceManager.AppContainers.Models.PoolManagementType? poolManagementType = default(Azure.ResourceManager.AppContainers.Models.PoolManagementType?), int? nodeCount = default(int?), Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration scaleConfiguration = null, System.Collections.Generic.IEnumerable secrets = null, Azure.ResourceManager.AppContainers.Models.SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration = null, Azure.ResourceManager.AppContainers.Models.CustomContainerTemplate customContainerTemplate = null, Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? sessionNetworkStatus = default(Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus?), Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus templateUpdateStatus = null, System.Uri poolManagementEndpoint = null, Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState?), System.Collections.Generic.IEnumerable managedIdentitySettings = null, Azure.ResourceManager.AppContainers.Models.McpServerSettings mcpServerSettings = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.SessionPoolData SessionPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier environmentId, Azure.ResourceManager.AppContainers.Models.ContainerType? containerType, Azure.ResourceManager.AppContainers.Models.PoolManagementType? poolManagementType, int? nodeCount, Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration scaleConfiguration, System.Collections.Generic.IEnumerable secrets, Azure.ResourceManager.AppContainers.Models.SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration, Azure.ResourceManager.AppContainers.Models.CustomContainerTemplate customContainerTemplate, Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? sessionNetworkStatus, System.Uri poolManagementEndpoint, Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState? provisioningState, System.Collections.Generic.IEnumerable managedIdentitySettings) { throw null; } public static Azure.ResourceManager.AppContainers.Models.SpringBootAdminComponent SpringBootAdminComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.SpringCloudConfigComponent SpringCloudConfigComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.SpringCloudEurekaComponent SpringCloudEurekaComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.SpringCloudGatewayComponent SpringCloudGatewayComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null, System.Collections.Generic.IEnumerable springCloudGatewayRoutes = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus TemplatePoolStatus(int? expectedCount = default(int?), int? readyCount = default(int?), int? pendingCount = default(int?), int? imagePullFailCount = default(int?), int? crashCount = default(int?), int? allocatedCount = default(int?)) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.TemplateStatus TemplateStatus(string details = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus status = null, System.Collections.Generic.IEnumerable containers = null, int? ingressTargetPort = default(int?)) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus TemplateUpdateStatus(Azure.ResourceManager.AppContainers.Models.TemplateStatus activeTemplate = null, Azure.ResourceManager.AppContainers.Models.TemplateStatus desiredTemplate = null) { throw null; } + } + public partial class BlobStorageTokenStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BlobStorageTokenStore() { } + public System.Uri BlobContainerUri { get { throw null; } set { } } + public string ClientId { get { throw null; } set { } } + public string ManagedIdentityResourceId { get { throw null; } set { } } + public string SasUrlSettingName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BlobStorageTokenStore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BlobStorageTokenStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BuildConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuildConfiguration() { } + public string BaseOS { get { throw null; } set { } } + public System.Collections.Generic.IList EnvironmentVariables { get { throw null; } } + public string Platform { get { throw null; } set { } } + public string PlatformVersion { get { throw null; } set { } } + public System.Collections.Generic.IList PreBuildSteps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuilderProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuilderProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuilderResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuilderResourcePatch() { } + public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.BuildProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildStatus(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus InProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.BuildStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.BuildStatus left, Azure.ResourceManager.AppContainers.Models.BuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.BuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.BuildStatus left, Azure.ResourceManager.AppContainers.Models.BuildStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuildToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BuildToken() { } + public System.DateTimeOffset? Expires { get { throw null; } } + public string Token { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CertificateType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CertificateType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.CertificateType ImagePullTrustedCA { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.CertificateType ServerSSLCertificate { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.CertificateType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.CertificateType left, Azure.ResourceManager.AppContainers.Models.CertificateType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.CertificateType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.CertificateType left, Azure.ResourceManager.AppContainers.Models.CertificateType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CircuitBreakerPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CircuitBreakerPolicy() { } + public int? ConsecutiveErrors { get { throw null; } set { } } + public int? IntervalInSeconds { get { throw null; } set { } } + public int? MaxEjectionPercent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConnectedEnvironmentDaprComponentProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConnectedEnvironmentDaprComponentProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState right) { throw null; } + public override string ToString() { throw null; } } public partial class ConnectedEnvironmentStorageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1786,6 +2559,7 @@ public ConnectedEnvironmentStorageProperties() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties AzureFile { get { throw null; } set { } } public string DeploymentErrors { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.SmbStorage Smb { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1838,6 +2612,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ContainerAppActiveRevisionsMode(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode Labels { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode Multiple { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode Single { get { throw null; } } public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode other) { throw null; } @@ -2049,6 +2824,7 @@ public ContainerAppBaseContainer() { } public System.Collections.Generic.IList Command { get { throw null; } } public System.Collections.Generic.IList Env { get { throw null; } } public string Image { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ImageType? ImageType { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.AppContainerResources Resources { get { throw null; } set { } } public System.Collections.Generic.IList VolumeMounts { get { throw null; } } @@ -2061,9 +2837,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ContainerAppBillingMeter : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ContainerAppBillingMeter() { } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties Properties { get { throw null; } set { } } + internal ContainerAppBillingMeter() { } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2093,12 +2869,12 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public partial class ContainerAppBillingMeterProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ContainerAppBillingMeterProperties() { } + internal ContainerAppBillingMeterProperties() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public string MeterType { get { throw null; } set { } } - public string WorkloadProfileCategory { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get { throw null; } } + public string DisplayName { get { throw null; } } + public string MeterType { get { throw null; } } + public string WorkloadProfileCategory { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2133,6 +2909,7 @@ public partial class ContainerAppCertificateProperties : System.ClientModel.Prim { public ContainerAppCertificateProperties() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties CertificateKeyVaultProperties { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.CertificateType? CertificateType { get { throw null; } set { } } public string DeploymentErrors { get { throw null; } } public System.DateTimeOffset? ExpireOn { get { throw null; } } public System.DateTimeOffset? IssueOn { get { throw null; } } @@ -2191,13 +2968,15 @@ public partial class ContainerAppConfiguration : System.ClientModel.Primitives.I public ContainerAppConfiguration() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode? ActiveRevisionsMode { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppDaprConfiguration Dapr { get { throw null; } set { } } - public bool? EnableMetrics { get { throw null; } set { } } public System.Collections.Generic.IList IdentitySettings { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration Ingress { get { throw null; } set { } } public int? MaxInactiveRevisions { get { throw null; } set { } } public System.Collections.Generic.IList Registries { get { throw null; } } + public int? RevisionTransitionThreshold { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.Runtime Runtime { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public string ServiceType { get { throw null; } set { } } + public string TargetLabel { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2774,7 +3553,9 @@ public partial class ContainerAppGitHubActionConfiguration : System.ClientModel. { public ContainerAppGitHubActionConfiguration() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppCredentials AzureCredentials { get { throw null; } set { } } + public System.Collections.Generic.IList BuildEnvironmentVariables { get { throw null; } } public string ContextPath { get { throw null; } set { } } + public string DockerfilePath { get { throw null; } set { } } public string GitHubPersonalAccessToken { get { throw null; } set { } } public string Image { get { throw null; } set { } } public string OS { get { throw null; } set { } } @@ -2951,6 +3732,7 @@ public ContainerAppHttpRouteTarget(string containerApp) { } public string ContainerApp { get { throw null; } set { } } public string Label { get { throw null; } set { } } public string Revision { get { throw null; } set { } } + public int? Weight { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppHttpRouteTarget System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3085,6 +3867,7 @@ public ContainerAppIngressConfiguration() { } public System.Collections.Generic.IList IPSecurityRestrictions { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.Affinity? StickySessionsAffinity { get { throw null; } set { } } public int? TargetPort { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme? TargetPortHttpScheme { get { throw null; } set { } } public System.Collections.Generic.IList Traffic { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? Transport { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3214,6 +3997,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerAppJobPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppJobPatch() { } + public Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } @@ -3339,7 +4123,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ContainerAppKind(string value) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppKind Functionapp { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppKind Workflowapp { get { throw null; } } public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppKind other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3355,6 +4138,7 @@ public partial class ContainerAppLogAnalyticsConfiguration : System.ClientModel. { public ContainerAppLogAnalyticsConfiguration() { } public string CustomerId { get { throw null; } set { } } + public bool? DynamicJsonColumns { get { throw null; } set { } } public string SharedKey { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppLogAnalyticsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3790,6 +4574,7 @@ public partial class ContainerAppReplicaContainer : System.ClientModel.Primitive { public ContainerAppReplicaContainer() { } public string ContainerId { get { throw null; } set { } } + public string DebugEndpoint { get { throw null; } } public string ExecEndpoint { get { throw null; } } public bool? IsReady { get { throw null; } set { } } public bool? IsStarted { get { throw null; } set { } } @@ -3910,6 +4695,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus left, Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class ContainerAppsBuildConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ContainerAppsBuildConfiguration() { } + public string BaseOS { get { throw null; } } + public System.Collections.Generic.IReadOnlyList EnvironmentVariables { get { throw null; } } + public string Platform { get { throw null; } } + public string PlatformVersion { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PreBuildSteps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerAppScale : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppScale() { } @@ -3981,6 +4781,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerAppServiceBind : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppServiceBind() { } + public string ClientType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary CustomizedKeys { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4020,6 +4822,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType EmptyDir { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType NfsAzureFile { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType Secret { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType Smb { get { throw null; } } public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -4075,7 +4878,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerAppTokenStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppTokenStore() { } - public string AzureBlobStorageSasUrlSettingName { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.BlobStorageTokenStore AzureBlobStorage { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public double? TokenRefreshExtensionHours { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4212,6 +5015,7 @@ public partial class ContainerAppWorkloadProfile : System.ClientModel.Primitives { public ContainerAppWorkloadProfile(string workloadProfileType, int minimumCount, int maximumCount) { } public ContainerAppWorkloadProfile(string name, string workloadProfileType) { } + public bool? EnableFips { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public int MaximumCount { get { throw null; } set { } } public int? MaximumNodeCount { get { throw null; } set { } } @@ -4265,6 +5069,44 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ContainerExecutionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ContainerExecutionStatus() { } + public string AdditionalInformation { get { throw null; } } + public int? Code { get { throw null; } } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerExecutionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerExecutionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerRegistry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerRegistry(string containerRegistryServer, Azure.Core.ResourceIdentifier identityResourceId) { } + public string ContainerRegistryServer { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier IdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerRegistryWithCustomImage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerRegistryWithCustomImage(string server) { } + public string Image { get { throw null; } set { } } + public string Server { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ContainerType : System.IEquatable { @@ -4311,45 +5153,265 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DaprComponentProvisioningState : System.IEquatable + public partial class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DaprComponentProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState InProgress { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState right) { throw null; } - public override string ToString() { throw null; } + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() { } + public int? ConsecutiveErrors { get { throw null; } set { } } + public int? IntervalInSeconds { get { throw null; } set { } } + public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class EncryptionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DaprComponentResiliencyPolicyConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public EncryptionSettings() { } - public string ContainerAppAuthEncryptionSecretName { get { throw null; } set { } } - public string ContainerAppAuthSigningSecretName { get { throw null; } set { } } + public DaprComponentResiliencyPolicyConfiguration() { } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration CircuitBreakerPolicy { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration HttpRetryPolicy { get { throw null; } set { } } + public int? ResponseTimeoutInSeconds { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class EventTriggerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public EventTriggerConfiguration() { } - public int? Parallelism { get { throw null; } set { } } - public int? ReplicaCompletionCount { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.ContainerAppJobScale Scale { get { throw null; } set { } } + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() { } + public int? InitialDelayInMilliseconds { get { throw null; } set { } } + public int? MaxIntervalInMilliseconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration() { } + public int? MaxRetries { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration RetryBackOff { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentServiceBinding : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprComponentServiceBinding() { } + public Azure.ResourceManager.AppContainers.Models.DaprServiceBindMetadata Metadata { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ServiceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentServiceBinding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentServiceBinding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprServiceBindMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprServiceBindMetadata() { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprServiceBindMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprServiceBindMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionBulkSubscribeConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionBulkSubscribeConfig() { } + public bool? IsEnabled { get { throw null; } set { } } + public int? MaxAwaitDurationMs { get { throw null; } set { } } + public int? MaxMessagesCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionRouteRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionRouteRule() { } + public string Match { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRouteRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRouteRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionRoutes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionRoutes() { } + public string Default { get { throw null; } set { } } + public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataDogConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataDogConfiguration() { } + public string Key { get { throw null; } set { } } + public string Site { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DataDogConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DataDogConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DestinationsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DestinationsConfiguration() { } + public Azure.ResourceManager.AppContainers.Models.DataDogConfiguration DataDogConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList OtlpConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DestinationsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DestinationsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DetectionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DetectionStatus(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.DetectionStatus Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DetectionStatus RegistryLoginFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DetectionStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.DetectionStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DetectionStatus left, Azure.ResourceManager.AppContainers.Models.DetectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.DetectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DetectionStatus left, Azure.ResourceManager.AppContainers.Models.DetectionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiskEncryptionConfigurationKeyVaultConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiskEncryptionConfigurationKeyVaultConfiguration() { } + public Azure.Core.ResourceIdentifier AuthIdentity { get { throw null; } set { } } + public System.Uri KeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DotNetComponentConfigurationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DotNetComponentConfigurationProperty() { } + public string PropertyName { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentConfigurationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentConfigurationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DotNetComponentProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DotNetComponentProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DotNetComponentServiceBind : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DotNetComponentServiceBind() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentServiceBind System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentServiceBind System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DotNetComponentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DotNetComponentType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentType AspireDashboard { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.DotNetComponentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DotNetComponentType left, Azure.ResourceManager.AppContainers.Models.DotNetComponentType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.DotNetComponentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DotNetComponentType left, Azure.ResourceManager.AppContainers.Models.DotNetComponentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EncryptionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EncryptionSettings() { } + public string ContainerAppAuthEncryptionSecretName { get { throw null; } set { } } + public string ContainerAppAuthSigningSecretName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EnvironmentVariable : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EnvironmentVariable(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EnvironmentVariable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EnvironmentVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EventTriggerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EventTriggerConfiguration() { } + public int? Parallelism { get { throw null; } set { } } + public int? ReplicaCompletionCount { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobScale Scale { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.EventTriggerConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4357,6 +5419,104 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class Header : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Header() { } + public string Key { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Header System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Header System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HeaderMatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HeaderMatch() { } + public string ExactMatch { get { throw null; } set { } } + public string Header { get { throw null; } set { } } + public string PrefixMatch { get { throw null; } set { } } + public string RegexMatch { get { throw null; } set { } } + public string SuffixMatch { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HeaderMatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HeaderMatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HttpConnectionPool : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HttpConnectionPool() { } + public int? Http1MaxPendingRequests { get { throw null; } set { } } + public int? Http2MaxRequests { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpConnectionPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpConnectionPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HttpGet : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HttpGet(System.Uri uri) { } + public string FileName { get { throw null; } set { } } + public System.Collections.Generic.IList Headers { get { throw null; } } + public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpGet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpGet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HttpRetryPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HttpRetryPolicy() { } + public System.Collections.Generic.IList Errors { get { throw null; } } + public System.Collections.Generic.IList Headers { get { throw null; } } + public System.Collections.Generic.IList HttpStatusCodes { get { throw null; } } + public long? InitialDelayInMilliseconds { get { throw null; } set { } } + public long? MaxIntervalInMilliseconds { get { throw null; } set { } } + public int? MaxRetries { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ImageType CloudBuild { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ImageType ContainerImage { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ImageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.ImageType left, Azure.ResourceManager.AppContainers.Models.ImageType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ImageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ImageType left, Azure.ResourceManager.AppContainers.Models.ImageType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class IngressConfigurationScale : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IngressConfigurationScale() { } + public int? MaxReplicas { get { throw null; } set { } } + public int? MinReplicas { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.IngressConfigurationScale System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.IngressConfigurationScale System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class IngressPortMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IngressPortMapping(bool external, int targetPort) { } @@ -4370,6 +5530,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IngressTargetPortHttpScheme : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IngressTargetPortHttpScheme(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme Http { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme Https { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme left, Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme left, Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme right) { throw null; } + public override string ToString() { throw null; } + } public partial class JavaComponentConfigurationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public JavaComponentConfigurationProperty() { } @@ -4505,12 +5683,97 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState left, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobRunningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobRunningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.JobRunningState Progressing { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobRunningState Ready { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobRunningState Suspended { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.JobRunningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.JobRunningState left, Azure.ResourceManager.AppContainers.Models.JobRunningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.JobRunningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.JobRunningState left, Azure.ResourceManager.AppContainers.Models.JobRunningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LabelHistoryRecordItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LabelHistoryRecordItem() { } + public string Revision { get { throw null; } } + public System.DateTimeOffset? Start { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.Status? Status { get { throw null; } } + public System.DateTimeOffset? Stop { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LabelHistoryRecordItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LabelHistoryRecordItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Level : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Level(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.Level Debug { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Error { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Info { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Off { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Trace { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Warn { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.Level other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.Level left, Azure.ResourceManager.AppContainers.Models.Level right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.Level (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.Level left, Azure.ResourceManager.AppContainers.Models.Level right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoggerSetting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LoggerSetting(string logger, Azure.ResourceManager.AppContainers.Models.Level level) { } + public Azure.ResourceManager.AppContainers.Models.Level Level { get { throw null; } set { } } + public string Logger { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LoggerSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LoggerSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LogicAppsProxyMethod : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LogicAppsProxyMethod(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod GET { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod Post { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod left, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod left, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod right) { throw null; } + public override string ToString() { throw null; } + } public partial class LogicAppWorkflowEnvelopeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogicAppWorkflowEnvelopeProperties() { } - public System.BinaryData Files { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState? FlowState { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth Health { get { throw null; } set { } } + internal LogicAppWorkflowEnvelopeProperties() { } + public System.BinaryData Files { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState? FlowState { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth Health { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4520,9 +5783,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class LogicAppWorkflowHealth : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogicAppWorkflowHealth(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState state) { } - public Azure.ResourceManager.AppContainers.Models.WorkflowErrorEntity Error { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState State { get { throw null; } set { } } + internal LogicAppWorkflowHealth() { } + public Azure.ResponseError Error { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState State { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4538,25 +5801,6 @@ public enum LogicAppWorkflowHealthState Unhealthy = 3, } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LogicAppWorkflowKind : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LogicAppWorkflowKind(string value) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind Agentic { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind Stateful { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind Stateless { get { throw null; } } - public bool Equals(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind left, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind right) { throw null; } - public static implicit operator Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind left, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LogicAppWorkflowState : System.IEquatable { private readonly object _dummy; @@ -4617,6 +5861,7 @@ public partial class ManagedEnvironmentIngressConfiguration : System.ClientModel public ManagedEnvironmentIngressConfiguration() { } public int? HeaderCountLimit { get { throw null; } set { } } public int? RequestIdleTimeout { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.IngressConfigurationScale Scale { get { throw null; } set { } } public int? TerminationGracePeriodSeconds { get { throw null; } set { } } public string WorkloadProfileName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4661,6 +5906,217 @@ public enum ManagedEnvironmentWeekDay Saturday = 5, Sunday = 6, } + public partial class McpServerCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal McpServerCredential() { } + public string ApiKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class McpServerSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public McpServerSettings() { } + public bool? IsMcpServerApiKeyDisabled { get { throw null; } set { } } + public bool? IsMcpServerEnabled { get { throw null; } set { } } + public string McpServerEndpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MetricsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MetricsConfiguration() { } + public System.Collections.Generic.IList Destinations { get { throw null; } } + public bool? IncludeKeda { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.MetricsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.MetricsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NacosComponent : Azure.ResourceManager.AppContainers.Models.JavaComponentProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NacosComponent() { } + public string IngressFqdn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.NacosComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.NacosComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OpenTelemetryConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OpenTelemetryConfiguration() { } + public Azure.ResourceManager.AppContainers.Models.DestinationsConfiguration DestinationsConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList LogsDestinations { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.MetricsConfiguration MetricsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.TracesConfiguration TracesConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OtlpConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OtlpConfiguration() { } + public string Endpoint { get { throw null; } set { } } + public System.Collections.Generic.IList Headers { get { throw null; } } + public bool? Insecure { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OtlpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OtlpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PatchApplyStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PatchApplyStatus(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus CreatingRevision { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus ImagePushPullFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus ManuallySkipped { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus RebaseFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus RebaseInProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus RevisionCreationFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus left, Azure.ResourceManager.AppContainers.Models.PatchApplyStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.PatchApplyStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus left, Azure.ResourceManager.AppContainers.Models.PatchApplyStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PatchDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchDetails() { } + public Azure.ResourceManager.AppContainers.Models.DetectionStatus DetectionStatus { get { throw null; } } + public System.DateTimeOffset LastDetectionOn { get { throw null; } } + public string NewImageName { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer NewLayer { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer OldLayer { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchType? PatchType { get { throw null; } } + public string TargetContainerName { get { throw null; } } + public string TargetImage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PatchDetailsNewLayer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchDetailsNewLayer() { } + public string FrameworkAndVersion { get { throw null; } } + public string Name { get { throw null; } } + public string OSAndVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PatchDetailsOldLayer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchDetailsOldLayer() { } + public string FrameworkAndVersion { get { throw null; } } + public string Name { get { throw null; } } + public string OSAndVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PatchingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PatchingMode(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchingMode Automatic { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchingMode Disabled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchingMode Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.PatchingMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.PatchingMode left, Azure.ResourceManager.AppContainers.Models.PatchingMode right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.PatchingMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PatchingMode left, Azure.ResourceManager.AppContainers.Models.PatchingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchProperties() { } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.DateTimeOffset? LastModifiedOn { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchApplyStatus? PatchApplyStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PatchDetails { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetContainerAppId { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetEnvironmentId { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetRevisionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PatchSkipConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PatchSkipConfig() { } + public bool? Skip { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchSkipConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchSkipConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PatchType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PatchType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchType FrameworkAndOSSecurity { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchType FrameworkSecurity { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchType OSSecurity { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchType Other { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.PatchType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.PatchType left, Azure.ResourceManager.AppContainers.Models.PatchType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.PatchType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PatchType left, Azure.ResourceManager.AppContainers.Models.PatchType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PoolManagementType : System.IEquatable { @@ -4679,6 +6135,31 @@ public enum ManagedEnvironmentWeekDay public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PoolManagementType left, Azure.ResourceManager.AppContainers.Models.PoolManagementType right) { throw null; } public override string ToString() { throw null; } } + public partial class PreBuildStep : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PreBuildStep() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.HttpGet HttpGet { get { throw null; } set { } } + public System.Collections.Generic.IList Scripts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PreBuildStep System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PreBuildStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReplicaExecutionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReplicaExecutionStatus() { } + public System.Collections.Generic.IReadOnlyList Containers { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ReplicaExecutionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ReplicaExecutionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RevisionRunningState : System.IEquatable { @@ -4701,6 +6182,57 @@ public enum ManagedEnvironmentWeekDay public static bool operator !=(Azure.ResourceManager.AppContainers.Models.RevisionRunningState left, Azure.ResourceManager.AppContainers.Models.RevisionRunningState right) { throw null; } public override string ToString() { throw null; } } + public partial class Runtime : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Runtime() { } + public bool? AutoConfigureDataProtection { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.RuntimeJava Java { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Runtime System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Runtime System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RuntimeJava : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RuntimeJava() { } + public bool? EnableMetrics { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.RuntimeJavaAgent JavaAgent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJava System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJava System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RuntimeJavaAgent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RuntimeJavaAgent() { } + public bool? IsEnabled { get { throw null; } set { } } + public System.Collections.Generic.IList LoggingLoggerSettings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJavaAgent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJavaAgent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ScgRoute : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScgRoute(string id, System.Uri uri) { } + public System.Collections.Generic.IList Filters { get { throw null; } } + public string Id { get { throw null; } set { } } + public long? Order { get { throw null; } set { } } + public System.Collections.Generic.IList Predicates { get { throw null; } } + public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ScgRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ScgRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SecretVolumeItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecretVolumeItem() { } @@ -4721,6 +6253,7 @@ public SessionContainer() { } public System.Collections.Generic.IList Env { get { throw null; } } public string Image { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Probes { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.SessionContainerResources Resources { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.SessionContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4864,6 +6397,82 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SessionProbe : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbe() { } + public int? FailureThreshold { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGet HttpGet { get { throw null; } set { } } + public int? InitialDelaySeconds { get { throw null; } set { } } + public int? PeriodSeconds { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.SessionProbeType? ProbeType { get { throw null; } set { } } + public int? SuccessThreshold { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.SessionProbeTcpSocket TcpSocket { get { throw null; } set { } } + public long? TerminationGracePeriodSeconds { get { throw null; } set { } } + public int? TimeoutSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbe System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SessionProbeHttpGet : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbeHttpGet(int port) { } + public string Host { get { throw null; } set { } } + public System.Collections.Generic.IList HttpHeaders { get { throw null; } } + public string Path { get { throw null; } set { } } + public int Port { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppHttpScheme? Scheme { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SessionProbeHttpGetHttpHeadersItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbeHttpGetHttpHeadersItem(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGetHttpHeadersItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGetHttpHeadersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SessionProbeTcpSocket : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbeTcpSocket(int port) { } + public string Host { get { throw null; } set { } } + public int Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeTcpSocket System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeTcpSocket System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SessionProbeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SessionProbeType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.SessionProbeType Liveness { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.SessionProbeType Startup { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.SessionProbeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.SessionProbeType left, Azure.ResourceManager.AppContainers.Models.SessionProbeType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.SessionProbeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.SessionProbeType left, Azure.ResourceManager.AppContainers.Models.SessionProbeType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SessionRegistryCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SessionRegistryCredentials() { } @@ -4878,6 +6487,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SmbStorage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SmbStorage() { } + public Azure.ResourceManager.AppContainers.Models.ContainerAppAccessMode? AccessMode { get { throw null; } set { } } + public string Domain { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string ShareName { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SmbStorage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SmbStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SpringBootAdminComponent : Azure.ResourceManager.AppContainers.Models.JavaComponentProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SpringBootAdminComponent() { } @@ -4910,22 +6535,115 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class WorkflowErrorEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SpringCloudGatewayComponent : Azure.ResourceManager.AppContainers.Models.JavaComponentProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public WorkflowErrorEntity() { } - public string Code { get { throw null; } set { } } - public System.Collections.Generic.IList Details { get { throw null; } } - public string ExtendedCode { get { throw null; } set { } } - public System.Collections.Generic.IList InnerErrors { get { throw null; } } - public string Message { get { throw null; } set { } } - public string MessageTemplate { get { throw null; } set { } } - public System.Collections.Generic.IList Parameters { get { throw null; } } - public string Target { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.WorkflowErrorEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.WorkflowErrorEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public SpringCloudGatewayComponent() { } + public string IngressFqdn { get { throw null; } } + public System.Collections.Generic.IList SpringCloudGatewayRoutes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SpringCloudGatewayComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SpringCloudGatewayComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Status : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Status(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.Status Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Status Starting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Status Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.Status other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.Status left, Azure.ResourceManager.AppContainers.Models.Status right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.Status (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.Status left, Azure.ResourceManager.AppContainers.Models.Status right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TemplatePoolStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TemplatePoolStatus() { } + public int? AllocatedCount { get { throw null; } } + public int? CrashCount { get { throw null; } } + public int? ExpectedCount { get { throw null; } } + public int? ImagePullFailCount { get { throw null; } } + public int? PendingCount { get { throw null; } } + public int? ReadyCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TemplateStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TemplateStatus() { } + public System.Collections.Generic.IReadOnlyList Containers { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Details { get { throw null; } } + public int? IngressTargetPort { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TemplateUpdateStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TemplateUpdateStatus() { } + public Azure.ResourceManager.AppContainers.Models.TemplateStatus ActiveTemplate { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.TemplateStatus DesiredTemplate { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TimeoutPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TimeoutPolicy() { } + public int? ConnectionTimeoutInSeconds { get { throw null; } set { } } + public int? ResponseTimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TimeoutPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TimeoutPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesConfiguration() { } + public System.Collections.Generic.IList Destinations { get { throw null; } } + public bool? IncludeDapr { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TracesConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TracesConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowArtifacts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowArtifacts() { } + public System.BinaryData AppSettings { get { throw null; } set { } } + public System.BinaryData Files { get { throw null; } set { } } + public System.Collections.Generic.IList FilesToDelete { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs index 958788e04eb8..59867f87764d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/api/Azure.ResourceManager.AppContainers.netstandard2.0.cs @@ -2,10 +2,18 @@ namespace Azure.ResourceManager.AppContainers { public static partial class AppContainersExtensions { + public static Azure.ResourceManager.AppContainers.AppResiliencyResource GetAppResiliencyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetAvailableWorkloadProfiles(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetAvailableWorkloadProfilesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetBillingMeters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetBillingMetersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuilderResource GetBuilderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetBuilderResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetBuilderResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuilderResourceCollection GetBuilderResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetBuilderResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetBuilderResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuildResource GetBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetContainerApp(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetContainerAppAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppAuthConfigResource GetContainerAppAuthConfigResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -51,10 +59,16 @@ public static partial class AppContainersExtensions public static Azure.ResourceManager.AppContainers.ContainerAppCollection GetContainerApps(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetContainerApps(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetContainerAppsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsBuildResource GetContainerAppsBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppSourceControlResource GetContainerAppSourceControlResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsPatchResource GetContainerAppsPatchResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetCustomDomainVerificationId(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetCustomDomainVerificationIdAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyResource GetDaprComponentResiliencyPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprSubscriptionResource GetDaprSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.DotNetComponentResource GetDotNetComponentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.JavaComponentResource GetJavaComponentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppContainers.LabelHistoryResource GetLabelHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.LogicAppResource GetLogicAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSessionPool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sessionPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -66,12 +80,199 @@ public static partial class AppContainersExtensions public static Azure.Pageable GetUsages(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetUsagesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class AppResiliencyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AppResiliencyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AppResiliencyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AppResiliencyData() { } + public Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy CircuitBreakerPolicy { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.HttpConnectionPool HttpConnectionPool { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy HttpRetryPolicy { get { throw null; } set { } } + public int? MaxConnections { get { throw null; } set { } } + public int? TcpRetryMaxConnectAttempts { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.TimeoutPolicy TimeoutPolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AppResiliencyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AppResiliencyResource() { } + public virtual Azure.ResourceManager.AppContainers.AppResiliencyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string appName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.AppResiliencyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppContainers.AppResiliencyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class AzureResourceManagerAppContainersContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureResourceManagerAppContainersContext() { } public static Azure.ResourceManager.AppContainers.AzureResourceManagerAppContainersContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class BuilderResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuilderResource() { } + public virtual Azure.ResourceManager.AppContainers.BuilderResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string builderName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildResource(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildResourceAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuildResourceCollection GetBuildResources() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuilderResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuilderResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppContainers.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string builderName, Azure.ResourceManager.AppContainers.BuilderResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BuilderResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuilderResourceData(Azure.Core.AzureLocation location) { } + public System.Collections.Generic.IList ContainerRegistries { get { throw null; } } + public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuilderResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BuildResource() { } + public virtual Azure.ResourceManager.AppContainers.BuildResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string builderName, string buildName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildAuthToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildAuthTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class BuildResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BuildResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string buildName, Azure.ResourceManager.AppContainers.BuildResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BuildResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuildResourceData() { } + public Azure.ResourceManager.AppContainers.Models.BuildStatus? BuildStatus { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.BuildConfiguration Configuration { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage DestinationContainerRegistry { get { throw null; } set { } } + public string LogStreamEndpoint { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? ProvisioningState { get { throw null; } } + public string TokenEndpoint { get { throw null; } } + public string UploadEndpoint { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.BuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectedEnvironmentDaprComponentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectedEnvironmentDaprComponentData() { } + public string ComponentType { get { throw null; } set { } } + public string DeploymentErrors { get { throw null; } } + public bool? IgnoreErrors { get { throw null; } set { } } + public string InitTimeout { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + public System.Collections.Generic.IList Secrets { get { throw null; } } + public string SecretStoreComponent { get { throw null; } set { } } + public System.Collections.Generic.IList ServiceComponentBind { get { throw null; } } + public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerAppAuthConfigCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerAppAuthConfigCollection() { } @@ -218,8 +419,8 @@ protected ContainerAppConnectedEnvironmentCollection() { } public partial class ContainerAppConnectedEnvironmentDaprComponentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerAppConnectedEnvironmentDaprComponentCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string componentName, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string componentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -232,11 +433,11 @@ protected ContainerAppConnectedEnvironmentDaprComponentCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ContainerAppConnectedEnvironmentDaprComponentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ContainerAppConnectedEnvironmentDaprComponentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected ContainerAppConnectedEnvironmentDaprComponentResource() { } - public virtual Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData Data { get { throw null; } } + public virtual Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -245,13 +446,13 @@ protected ContainerAppConnectedEnvironmentDaprComponentResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerAppConnectedEnvironmentData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -365,14 +566,13 @@ public partial class ContainerAppDaprComponentData : Azure.ResourceManager.Model { public ContainerAppDaprComponentData() { } public string ComponentType { get { throw null; } set { } } - public string DeploymentErrors { get { throw null; } } public bool? IgnoreErrors { get { throw null; } set { } } public string InitTimeout { get { throw null; } set { } } public System.Collections.Generic.IList Metadata { get { throw null; } } - public Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Scopes { get { throw null; } } public System.Collections.Generic.IList Secrets { get { throw null; } } public string SecretStoreComponent { get { throw null; } set { } } + public System.Collections.Generic.IList ServiceComponentBind { get { throw null; } } public string Version { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -386,6 +586,7 @@ public partial class ContainerAppData : Azure.ResourceManager.Models.TrackedReso public ContainerAppData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration Configuration { get { throw null; } set { } } public string CustomDomainVerificationId { get { throw null; } } + public string DeploymentErrors { get { throw null; } } public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } public System.Uri EventStreamEndpoint { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation ExtendedLocation { get { throw null; } set { } } @@ -400,6 +601,7 @@ public ContainerAppData(Azure.Core.AzureLocation location) { } [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release", false)] public System.Collections.Generic.IReadOnlyList OutboundIPAddresses { get { throw null; } } public System.Collections.Generic.IReadOnlyList OutboundIPAddressList { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchingMode? PatchingMode { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? RunningStatus { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate Template { get { throw null; } set { } } @@ -569,9 +771,11 @@ public ContainerAppJobData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration Configuration { get { throw null; } set { } } public string EnvironmentId { get { throw null; } set { } } public string EventStreamEndpoint { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList OutboundIPAddresses { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.JobRunningState? RunningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate Template { get { throw null; } set { } } public string WorkloadProfileName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -654,7 +858,10 @@ protected ContainerAppJobExecutionCollection() { } public partial class ContainerAppJobExecutionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerAppJobExecutionData() { } + public System.Collections.Generic.IReadOnlyList DetailedStatusReplicas { get { throw null; } } public System.DateTimeOffset? EndOn { get { throw null; } } + public string Message { get { throw null; } } + public string Reason { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? Status { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate Template { get { throw null; } } @@ -708,12 +915,16 @@ protected ContainerAppJobResource() { } public virtual Azure.AsyncPageable GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resume(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResumeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation StopMultipleExecutions(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> StopMultipleExecutionsAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Suspend(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SuspendAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.ContainerAppJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -909,6 +1120,9 @@ protected ContainerAppManagedEnvironmentDaprComponentResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyCollection GetDaprComponentResiliencyPolicies() { throw null; } + public virtual Azure.Response GetDaprComponentResiliencyPolicy(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDaprComponentResiliencyPolicyAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -922,23 +1136,28 @@ protected ContainerAppManagedEnvironmentDaprComponentResource() { } public partial class ContainerAppManagedEnvironmentData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppManagedEnvironmentData(Azure.Core.AzureLocation location) { } + public string AppInsightsConnectionString { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration AppLogsConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList AvailabilityZones { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration CustomDomainConfiguration { get { throw null; } set { } } public string DaprAIConnectionString { get { throw null; } set { } } public string DaprAIInstrumentationKey { get { throw null; } set { } } public string DaprVersion { get { throw null; } } public string DefaultDomain { get { throw null; } } public string DeploymentErrors { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration DiskEncryptionKeyVaultConfiguration { get { throw null; } set { } } public string EventStreamEndpoint { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string InfrastructureResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentIngressConfiguration IngressConfiguration { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } public bool? IsMtlsEnabled { get { throw null; } set { } } + public bool? IsPeerToPeerEncryptionEnabled { get { throw null; } set { } } public bool? IsZoneRedundant { get { throw null; } set { } } public string KedaVersion { get { throw null; } } public string Kind { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration OpenTelemetryConfiguration { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } + public string PrivateLinkDefaultDomain { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1040,6 +1259,12 @@ protected ContainerAppManagedEnvironmentResource() { } public virtual Azure.Response GetContainerAppPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppPrivateEndpointConnectionCollection GetContainerAppPrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetDaprSubscription(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDaprSubscriptionAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprSubscriptionCollection GetDaprSubscriptions() { throw null; } + public virtual Azure.Response GetDotNetComponent(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDotNetComponentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DotNetComponentCollection GetDotNetComponents() { throw null; } public virtual Azure.Response GetJavaComponent(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetJavaComponentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.JavaComponentCollection GetJavaComponents() { throw null; } @@ -1217,6 +1442,9 @@ protected ContainerAppResource() { } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.AppResiliencyCollection GetAppResiliencies() { throw null; } + public virtual Azure.Response GetAppResiliency(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAppResiliencyAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAuthToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAuthTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1233,11 +1461,20 @@ protected ContainerAppResource() { } public virtual Azure.Response GetContainerAppRevision(string revisionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppRevisionAsync(string revisionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppRevisionCollection GetContainerAppRevisions() { throw null; } + public virtual Azure.Response GetContainerAppsBuildResource(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerAppsBuildResourceAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceCollection GetContainerAppsBuildResources() { throw null; } public virtual Azure.Response GetContainerAppSourceControl(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppSourceControlAsync(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppSourceControlCollection GetContainerAppSourceControls() { throw null; } + public virtual Azure.Response GetContainerAppsPatchResource(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetContainerAppsPatchResourceAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceCollection GetContainerAppsPatchResources() { throw null; } public virtual Azure.Response GetCustomHostNameAnalysis(string customHostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetCustomHostNameAnalysisAsync(string customHostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.LabelHistoryCollection GetLabelHistories() { throw null; } + public virtual Azure.Response GetLabelHistory(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetLabelHistoryAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetLogicApp(string logicAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetLogicAppAsync(string logicAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.LogicAppCollection GetLogicApps() { throw null; } @@ -1281,6 +1518,7 @@ public ContainerAppRevisionData() { } public string Fqdn { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? HealthState { get { throw null; } } public bool? IsActive { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Labels { get { throw null; } } public System.DateTimeOffset? LastActiveOn { get { throw null; } } public string ProvisioningError { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? ProvisioningState { get { throw null; } } @@ -1311,6 +1549,8 @@ protected ContainerAppRevisionResource() { } public virtual Azure.Response GetContainerAppReplica(string replicaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppReplicaAsync(string replicaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppReplicaCollection GetContainerAppReplicas() { throw null; } + public virtual Azure.Response InvokeFunctionsHostFunctionsExtension(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> InvokeFunctionsHostFunctionsExtensionAsync(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RestartRevision(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RestartRevisionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppRevisionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1319,11 +1559,58 @@ protected ContainerAppRevisionResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ContainerAppsBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerAppsBuildResource() { } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string buildName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerAppsBuildResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerAppsBuildResourceCollection() { } + public virtual Azure.Response Exists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string buildName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerAppsBuildResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerAppsBuildResourceData() { } + public Azure.ResourceManager.AppContainers.Models.BuildStatus? BuildStatus { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration Configuration { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage DestinationContainerRegistry { get { throw null; } } + public string LogStreamEndpoint { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerAppSourceControlCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ContainerAppSourceControlCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sourceControlName, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string sourceControlName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1357,8 +1644,8 @@ protected ContainerAppSourceControlResource() { } public virtual Azure.ResourceManager.AppContainers.ContainerAppSourceControlData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = default(bool?), bool? deleteWorkflow = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = default(bool?), bool? deleteWorkflow = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.ContainerAppSourceControlData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1366,8 +1653,206 @@ protected ContainerAppSourceControlResource() { } Azure.ResourceManager.AppContainers.ContainerAppSourceControlData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ContainerAppsPatchResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ContainerAppsPatchResource() { } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation Apply(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ApplyAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation SkipConfigure(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.PatchSkipConfig patchSkipConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SkipConfigureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.Models.PatchSkipConfig patchSkipConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerAppsPatchResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ContainerAppsPatchResourceCollection() { } + public virtual Azure.Response Exists(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string patchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ContainerAppsPatchResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerAppsPatchResourceData() { } + public Azure.ResourceManager.AppContainers.Models.PatchProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentResiliencyPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DaprComponentResiliencyPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DaprComponentResiliencyPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprComponentResiliencyPolicyData() { } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration InboundPolicy { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration OutboundPolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentResiliencyPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DaprComponentResiliencyPolicyResource() { } + public virtual Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DaprSubscriptionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DaprSubscriptionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DaprSubscriptionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionData() { } + public Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig BulkSubscribe { get { throw null; } set { } } + public string DeadLetterTopic { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + public string PubsubName { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes Routes { get { throw null; } set { } } + public System.Collections.Generic.IList Scopes { get { throw null; } } + public string Topic { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DaprSubscriptionResource() { } + public virtual Azure.ResourceManager.AppContainers.DaprSubscriptionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DaprSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DaprSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DotNetComponentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DotNetComponentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DotNetComponentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DotNetComponentData() { } + public Azure.ResourceManager.AppContainers.Models.DotNetComponentType? ComponentType { get { throw null; } set { } } + public System.Collections.Generic.IList Configurations { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList ServiceBinds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DotNetComponentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DotNetComponentResource() { } + public virtual Azure.ResourceManager.AppContainers.DotNetComponentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.DotNetComponentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.DotNetComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class JavaComponentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -1416,6 +1901,49 @@ protected JavaComponentResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.JavaComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppContainers.JavaComponentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class LabelHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected LabelHistoryCollection() { } + public virtual Azure.Response Exists(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string labelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class LabelHistoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LabelHistoryData() { } + public System.Collections.Generic.IReadOnlyList LabelHistoryRecords { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LabelHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected LabelHistoryResource() { } + public virtual Azure.ResourceManager.AppContainers.LabelHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string labelName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.LabelHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class LogicAppCollection : Azure.ResourceManager.ArmCollection { protected LogicAppCollection() { } @@ -1431,6 +1959,7 @@ protected LogicAppCollection() { } public partial class LogicAppData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LogicAppData() { } + public System.BinaryData Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.LogicAppData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1447,6 +1976,8 @@ protected LogicAppResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeployWorkflowArtifacts(Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployWorkflowArtifactsAsync(Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetLogicAppWorkflowEnvelope(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1454,6 +1985,8 @@ protected LogicAppResource() { } public virtual Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeCollection GetLogicAppWorkflowEnvelopes() { throw null; } public virtual Azure.Response GetWorkflowsConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWorkflowsConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Invoke(string xMsLogicAppsProxyPath, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod xMsLogicAppsProxyMethod, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> InvokeAsync(string xMsLogicAppsProxyPath, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod xMsLogicAppsProxyMethod, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.LogicAppData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.LogicAppData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1479,9 +2012,10 @@ protected LogicAppWorkflowEnvelopeCollection() { } } public partial class LogicAppWorkflowEnvelopeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogicAppWorkflowEnvelopeData() { } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind? Kind { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties Properties { get { throw null; } set { } } + internal LogicAppWorkflowEnvelopeData() { } + public string Kind { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1530,6 +2064,7 @@ public SessionPoolData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList ManagedIdentitySettings { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.McpServerSettings McpServerSettings { get { throw null; } set { } } public int? NodeCount { get { throw null; } } public System.Uri PoolManagementEndpoint { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.PoolManagementType? PoolManagementType { get { throw null; } set { } } @@ -1537,6 +2072,7 @@ public SessionPoolData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration ScaleConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? SessionNetworkStatus { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus TemplateUpdateStatus { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.SessionPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1555,10 +2091,14 @@ protected SessionPoolResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sessionPoolName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response FetchMcpServerCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> FetchMcpServerCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RotateMcpServerCredentials(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RotateMcpServerCredentialsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.AppContainers.SessionPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1575,6 +2115,9 @@ namespace Azure.ResourceManager.AppContainers.Mocking public partial class MockableAppContainersArmClient : Azure.ResourceManager.ArmResource { protected MockableAppContainersArmClient() { } + public virtual Azure.ResourceManager.AppContainers.AppResiliencyResource GetAppResiliencyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuilderResource GetBuilderResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuildResource GetBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppAuthConfigResource GetContainerAppAuthConfigResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppConnectedEnvironmentCertificateResource GetContainerAppConnectedEnvironmentCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppConnectedEnvironmentDaprComponentResource GetContainerAppConnectedEnvironmentDaprComponentResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1600,8 +2143,14 @@ protected MockableAppContainersArmClient() { } public virtual Azure.ResourceManager.AppContainers.ContainerAppReplicaResource GetContainerAppReplicaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppResource GetContainerAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppRevisionResource GetContainerAppRevisionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsBuildResource GetContainerAppsBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.ContainerAppSourceControlResource GetContainerAppSourceControlResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.ContainerAppsPatchResource GetContainerAppsPatchResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyResource GetDaprComponentResiliencyPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DaprSubscriptionResource GetDaprSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.DotNetComponentResource GetDotNetComponentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.JavaComponentResource GetJavaComponentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppContainers.LabelHistoryResource GetLabelHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.LogicAppResource GetLogicAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppContainers.SessionPoolResource GetSessionPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -1609,6 +2158,9 @@ protected MockableAppContainersArmClient() { } public partial class MockableAppContainersResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableAppContainersResourceGroupResource() { } + public virtual Azure.Response GetBuilderResource(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuilderResourceAsync(string builderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppContainers.BuilderResourceCollection GetBuilderResources() { throw null; } public virtual Azure.Response GetContainerApp(string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetContainerAppAsync(string containerAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetContainerAppConnectedEnvironment(string connectedEnvironmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1632,6 +2184,8 @@ protected MockableAppContainersSubscriptionResource() { } public virtual Azure.AsyncPageable GetAvailableWorkloadProfilesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetBillingMeters(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetBillingMetersAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetBuilderResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetBuilderResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetContainerAppConnectedEnvironments(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetContainerAppConnectedEnvironmentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetContainerAppJobs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1673,6 +2227,7 @@ public partial class AppContainerResources : System.ClientModel.Primitives.IJson public AppContainerResources() { } public double? Cpu { get { throw null; } set { } } public string EphemeralStorage { get { throw null; } } + public double? Gpu { get { throw null; } set { } } public string Memory { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.AppContainerResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1700,18 +2255,30 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ArmAppContainersModelFactory { - public static Azure.ResourceManager.AppContainers.Models.AppContainerResources AppContainerResources(double? cpu = default(double?), string memory = null, string ephemeralStorage = null) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties azureFile = null, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState?), string deploymentErrors = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.AppContainerResources AppContainerResources(double? cpu, string memory, string ephemeralStorage) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.AppContainerResources AppContainerResources(double? cpu = default(double?), string memory = null, string ephemeralStorage = null, double? gpu = default(double?)) { throw null; } + public static Azure.ResourceManager.AppContainers.AppResiliencyData AppResiliencyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.TimeoutPolicy timeoutPolicy = null, Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy httpRetryPolicy = null, int? tcpRetryMaxConnectAttempts = default(int?), Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy circuitBreakerPolicy = null, Azure.ResourceManager.AppContainers.Models.HttpConnectionPool httpConnectionPool = null, int? maxConnections = default(int?)) { throw null; } + public static Azure.ResourceManager.AppContainers.BuilderResourceData BuilderResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState?), Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IEnumerable containerRegistries = null) { throw null; } + public static Azure.ResourceManager.AppContainers.BuildResourceData BuildResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState?), Azure.ResourceManager.AppContainers.Models.BuildStatus? buildStatus = default(Azure.ResourceManager.AppContainers.Models.BuildStatus?), Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage destinationContainerRegistry = null, Azure.ResourceManager.AppContainers.Models.BuildConfiguration configuration = null, string uploadEndpoint = null, string logStreamEndpoint = null, string tokenEndpoint = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuildToken BuildToken(string token = null, System.DateTimeOffset? expires = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ConnectedEnvironmentDaprComponentData ConnectedEnvironmentDaprComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = default(bool?), string initTimeout = null, System.Collections.Generic.IEnumerable secrets = null, string secretStoreComponent = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable scopes = null, System.Collections.Generic.IEnumerable serviceComponentBind = null, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState?), string deploymentErrors = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties azureFile, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? provisioningState, string deploymentErrors) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState?), string deploymentErrors = null, Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties azureFile = null, Azure.ResourceManager.AppContainers.Models.SmbStorage smb = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppAuthConfigData ContainerAppAuthConfigData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.AppContainers.Models.ContainerAppAuthPlatform platform, Azure.ResourceManager.AppContainers.Models.ContainerAppGlobalValidation globalValidation, Azure.ResourceManager.AppContainers.Models.ContainerAppIdentityProvidersConfiguration identityProviders, Azure.ResourceManager.AppContainers.Models.ContainerAppLogin login, Azure.ResourceManager.AppContainers.Models.ContainerAppHttpSettings httpSettings) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppAuthConfigData ContainerAppAuthConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppAuthPlatform platform = null, Azure.ResourceManager.AppContainers.Models.ContainerAppGlobalValidation globalValidation = null, Azure.ResourceManager.AppContainers.Models.ContainerAppIdentityProvidersConfiguration identityProviders = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogin login = null, Azure.ResourceManager.AppContainers.Models.ContainerAppHttpSettings httpSettings = null, Azure.ResourceManager.AppContainers.Models.EncryptionSettings encryptionSettings = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppAuthToken ContainerAppAuthToken(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string token = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppAvailableWorkloadProfile ContainerAppAvailableWorkloadProfile(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppContainers.Models.ContainerAppAvailableWorkloadProfileProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeter ContainerAppBillingMeter(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties ContainerAppBillingMeterProperties(string workloadProfileCategory = null, string meterType = null, string displayName = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppCertificateData ContainerAppCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties properties = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, System.Collections.Generic.IEnumerable subjectAlternativeNames, byte[] value, string issuer, System.DateTimeOffset? issueOn, System.DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState?), string deploymentErrors = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties = null, string password = null, string subjectName = null, System.Collections.Generic.IEnumerable subjectAlternativeNames = null, byte[] value = null, string issuer = null, System.DateTimeOffset? issueOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), string thumbprint = null, bool? isValid = default(bool?), string publicKeyHash = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState, string deploymentErrors, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, System.Collections.Generic.IEnumerable subjectAlternativeNames, byte[] value, string issuer, System.DateTimeOffset? issueOn, System.DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState?), string deploymentErrors = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties = null, string password = null, string subjectName = null, System.Collections.Generic.IEnumerable subjectAlternativeNames = null, byte[] value = null, string issuer = null, System.DateTimeOffset? issueOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), string thumbprint = null, bool? isValid = default(bool?), string publicKeyHash = null, Azure.ResourceManager.AppContainers.Models.CertificateType? certificateType = default(Azure.ResourceManager.AppContainers.Models.CertificateType?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProperties ContainerAppCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState, string password, string subjectName, System.Collections.Generic.IEnumerable subjectAlternativeNames, byte[] value, string issuer, System.DateTimeOffset? issueOn, System.DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppConnectedEnvironmentData ContainerAppConnectedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.AppContainers.Models.ContainerAppConnectedEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppConnectedEnvironmentProvisioningState?), string deploymentErrors = null, string defaultDomain = null, System.Net.IPAddress staticIP = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null) { throw null; } @@ -1726,9 +2293,11 @@ public static partial class ArmAppContainersModelFactory public static Azure.ResourceManager.AppContainers.Models.ContainerAppCustomHostnameAnalysisResult ContainerAppCustomHostnameAnalysisResult(string hostName = null, bool? isHostnameAlreadyVerified = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppDnsVerificationTestResult? customDomainVerificationTest = default(Azure.ResourceManager.AppContainers.Models.ContainerAppDnsVerificationTestResult?), Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo = null, bool? hasConflictOnManagedEnvironment = default(bool?), bool? conflictWithEnvironmentCustomDomain = default(bool?), string conflictingContainerAppResourceId = null, System.Collections.Generic.IEnumerable cNameRecords = null, System.Collections.Generic.IEnumerable txtRecords = null, System.Collections.Generic.IEnumerable aRecords = null, System.Collections.Generic.IEnumerable alternateCNameRecords = null, System.Collections.Generic.IEnumerable alternateTxtRecords = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData ContainerAppDaprComponentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string componentType, string version, bool? ignoreErrors, string initTimeout, System.Collections.Generic.IEnumerable secrets, string secretStoreComponent, System.Collections.Generic.IEnumerable metadata, System.Collections.Generic.IEnumerable scopes) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData ContainerAppDaprComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = default(bool?), string initTimeout = null, System.Collections.Generic.IEnumerable secrets = null, string secretStoreComponent = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable scopes = null, Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState?), string deploymentErrors = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppDaprComponentData ContainerAppDaprComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = default(bool?), string initTimeout = null, System.Collections.Generic.IEnumerable secrets = null, string secretStoreComponent = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable scopes = null, System.Collections.Generic.IEnumerable serviceComponentBind = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppDaprSecret ContainerAppDaprSecret(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string managedBy = null, Azure.ResourceManager.AppContainers.Models.ContainerAppKind? kind = default(Azure.ResourceManager.AppContainers.Models.ContainerAppKind?), Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? runningStatus = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus?), Azure.Core.ResourceIdentifier managedEnvironmentId = null, Azure.Core.ResourceIdentifier environmentId = null, string workloadProfileName = null, string latestRevisionName = null, string latestReadyRevisionName = null, string latestRevisionFqdn = null, string customDomainVerificationId = null, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddressList = null, System.Uri eventStreamEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string managedBy, Azure.ResourceManager.AppContainers.Models.ContainerAppKind? kind, Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState, Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? runningStatus, Azure.Core.ResourceIdentifier managedEnvironmentId, Azure.Core.ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template, System.Collections.Generic.IEnumerable outboundIPAddressList, System.Uri eventStreamEndpoint) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string managedBy = null, Azure.ResourceManager.AppContainers.Models.ContainerAppKind? kind = default(Azure.ResourceManager.AppContainers.Models.ContainerAppKind?), Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus? runningStatus = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus?), string deploymentErrors = null, Azure.Core.ResourceIdentifier managedEnvironmentId = null, Azure.Core.ResourceIdentifier environmentId = null, string workloadProfileName = null, Azure.ResourceManager.AppContainers.Models.PatchingMode? patchingMode = default(Azure.ResourceManager.AppContainers.Models.PatchingMode?), string latestRevisionName = null, string latestReadyRevisionName = null, string latestRevisionFqdn = null, string customDomainVerificationId = null, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddressList = null, System.Uri eventStreamEndpoint = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppData ContainerAppData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string managedBy, Azure.ResourceManager.AppContainers.Models.ContainerAppProvisioningState? provisioningState, Azure.Core.ResourceIdentifier managedEnvironmentId, Azure.Core.ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration configuration, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template, System.Collections.Generic.IEnumerable outboundIPAddressList, System.Uri eventStreamEndpoint) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1742,43 +2311,247 @@ public static partial class ArmAppContainersModelFactory public static Azure.ResourceManager.AppContainers.Models.ContainerAppHttpRouteProvisioningErrors ContainerAppHttpRouteProvisioningErrors(System.DateTimeOffset? errorOccurredOn = default(System.DateTimeOffset?), string message = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport, System.Collections.Generic.IEnumerable traffic, System.Collections.Generic.IEnumerable customDomains, bool? allowInsecure, System.Collections.Generic.IEnumerable ipSecurityRestrictions, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode, Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn = null, bool? external = default(bool?), int? targetPort = default(int?), int? exposedPort = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod?), System.Collections.Generic.IEnumerable traffic = null, System.Collections.Generic.IEnumerable customDomains = null, bool? allowInsecure = default(bool?), System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity = default(Azure.ResourceManager.AppContainers.Models.Affinity?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode?), Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy = null, System.Collections.Generic.IEnumerable additionalPortMappings = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppJobData ContainerAppJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState?), string environmentId = null, string workloadProfileName = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport, System.Collections.Generic.IEnumerable traffic, System.Collections.Generic.IEnumerable customDomains, bool? allowInsecure, System.Collections.Generic.IEnumerable ipSecurityRestrictions, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity, Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode, Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy, System.Collections.Generic.IEnumerable additionalPortMappings) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn = null, bool? external = default(bool?), int? targetPort = default(int?), int? exposedPort = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? transport = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod?), System.Collections.Generic.IEnumerable traffic = null, System.Collections.Generic.IEnumerable customDomains = null, bool? allowInsecure = default(bool?), System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppContainers.Models.Affinity? stickySessionsAffinity = default(Azure.ResourceManager.AppContainers.Models.Affinity?), Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode? clientCertificateMode = default(Azure.ResourceManager.AppContainers.Models.ContainerAppIngressClientCertificateMode?), Azure.ResourceManager.AppContainers.Models.ContainerAppCorsPolicy corsPolicy = null, System.Collections.Generic.IEnumerable additionalPortMappings = null, Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme? targetPortHttpScheme = default(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppJobData ContainerAppJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState?), Azure.ResourceManager.AppContainers.Models.JobRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.JobRunningState?), string environmentId = null, string workloadProfileName = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration configuration = null, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate template = null, System.Collections.Generic.IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppJobData ContainerAppJobData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.AppContainers.Models.ContainerAppJobProvisioningState? provisioningState, string environmentId, string workloadProfileName, Azure.ResourceManager.AppContainers.Models.ContainerAppJobConfiguration configuration, Azure.ResourceManager.AppContainers.Models.ContainerAppJobTemplate template, System.Collections.Generic.IEnumerable outboundIPAddresses, string eventStreamEndpoint) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionBase ContainerAppJobExecutionBase(string name = null, string id = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData ContainerAppJobExecutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status = default(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData ContainerAppJobExecutionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status, System.DateTimeOffset? startOn, System.DateTimeOffset? endOn, Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppJobExecutionData ContainerAppJobExecutionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState? status = default(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutionTemplate template = null, System.Collections.Generic.IEnumerable detailedStatusReplicas = null, string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppJobExecutions ContainerAppJobExecutions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppMaintenanceConfigurationData ContainerAppMaintenanceConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable scheduledEntries = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppManagedCertificateData ContainerAppManagedCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppContainers.Models.ManagedCertificateProperties properties = null) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string kind, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, System.Net.IPAddress staticIP, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, System.Collections.Generic.IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled, bool? isEnabled) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState?), string daprAIInstrumentationKey = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration = null, bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, System.Collections.Generic.IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = default(bool?), bool? isEnabled = default(bool?), Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentIngressConfiguration ingressConfiguration = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState?), string daprAIInstrumentationKey = null, string daprAIConnectionString = null, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, string privateLinkDefaultDomain = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration = null, string appInsightsConnectionString = null, Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration openTelemetryConfiguration = null, bool? isZoneRedundant = default(bool?), System.Collections.Generic.IEnumerable availabilityZones = null, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, System.Collections.Generic.IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = default(bool?), bool? isPeerToPeerEncryptionEnabled = default(bool?), Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentIngressConfiguration ingressConfiguration = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.AppContainers.Models.ContainerAppPublicNetworkAccess?), Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration diskEncryptionKeyVaultConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string kind, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, System.Net.IPAddress staticIP, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, System.Collections.Generic.IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string kind, Azure.ResourceManager.AppContainers.Models.ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, Azure.ResourceManager.AppContainers.Models.ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, System.Net.IPAddress staticIP, Azure.ResourceManager.AppContainers.Models.ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, Azure.ResourceManager.AppContainers.Models.ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, System.Collections.Generic.IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled, bool? isEnabled) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentStorageData ContainerAppManagedEnvironmentStorageData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties managedEnvironmentStorageAzureFile = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppManagedEnvironmentStorageData ContainerAppManagedEnvironmentStorageData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ManagedEnvironmentStorageProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppNameAvailabilityResult ContainerAppNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.AppContainers.Models.ContainerAppNameUnavailableReason? reason = default(Azure.ResourceManager.AppContainers.Models.ContainerAppNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppPrivateEndpointConnectionData ContainerAppPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable groupIds = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppPrivateLink ContainerAppPrivateLink(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = default(bool?), bool? isStarted = default(bool?), int? restartCount = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState?), string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name, string containerId, bool? isReady, bool? isStarted, int? restartCount, Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? runningState, string runningStateDetails, string logStreamEndpoint, string execEndpoint) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = default(bool?), bool? isStarted = default(bool?), int? restartCount = default(int?), Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppContainerRunningState?), string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null, string debugEndpoint = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppReplicaData ContainerAppReplicaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppReplicaRunningState?), string runningStateDetails = null, System.Collections.Generic.IEnumerable containers = null, System.Collections.Generic.IEnumerable initContainers = null) { throw null; } - public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveOn = default(System.DateTimeOffset?), string fqdn = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, bool? isActive = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), string provisioningError = null, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState?), Azure.ResourceManager.AppContainers.Models.RevisionRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.RevisionRunningState?)) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveOn = default(System.DateTimeOffset?), string fqdn = null, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template = null, bool? isActive = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), System.Collections.Generic.IEnumerable labels = null, string provisioningError = null, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState?), Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState?), Azure.ResourceManager.AppContainers.Models.RevisionRunningState? runningState = default(Azure.ResourceManager.AppContainers.Models.RevisionRunningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.ContainerAppRevisionData ContainerAppRevisionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.DateTimeOffset? createdOn, System.DateTimeOffset? lastActiveOn, string fqdn, Azure.ResourceManager.AppContainers.Models.ContainerAppTemplate template, bool? isActive, int? replicas, int? trafficWeight, string provisioningError, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionHealthState? healthState, Azure.ResourceManager.AppContainers.Models.ContainerAppRevisionProvisioningState? provisioningState, Azure.ResourceManager.AppContainers.Models.RevisionRunningState? runningState) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration ContainerAppsBuildConfiguration(string baseOS = null, string platform = null, string platformVersion = null, System.Collections.Generic.IEnumerable environmentVariables = null, System.Collections.Generic.IEnumerable preBuildSteps = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsBuildResourceData ContainerAppsBuildResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState?), Azure.ResourceManager.AppContainers.Models.BuildStatus? buildStatus = default(Azure.ResourceManager.AppContainers.Models.BuildStatus?), Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage destinationContainerRegistry = null, Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration configuration = null, string logStreamEndpoint = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppSecret ContainerAppSecret(string name = null, string value = null, string identity = null, System.Uri keyVaultUri = null) { throw null; } public static Azure.ResourceManager.AppContainers.ContainerAppSourceControlData ContainerAppSourceControlData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppSourceControlOperationState? operationState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppSourceControlOperationState?), System.Uri repoUri = null, string branch = null, Azure.ResourceManager.AppContainers.Models.ContainerAppGitHubActionConfiguration gitHubActionConfiguration = null) { throw null; } + public static Azure.ResourceManager.AppContainers.ContainerAppsPatchResourceData ContainerAppsPatchResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.PatchProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppUsage ContainerAppUsage(Azure.ResourceManager.AppContainers.Models.ContainerAppUsageUnit unit = default(Azure.ResourceManager.AppContainers.Models.ContainerAppUsageUnit), float currentValue = 0f, float limit = 0f, Azure.ResourceManager.AppContainers.Models.ContainerAppUsageName name = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppUsageName ContainerAppUsageName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ContainerAppWorkloadProfileState ContainerAppWorkloadProfileState(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.ContainerAppWorkloadProfileStateProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerExecutionStatus ContainerExecutionStatus(string name = null, int? code = default(int?), string additionalInformation = null, string status = null) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprComponentResiliencyPolicyData DaprComponentResiliencyPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration inboundPolicy = null, Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration outboundPolicy = null) { throw null; } + public static Azure.ResourceManager.AppContainers.DaprSubscriptionData DaprSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string pubsubName = null, string topic = null, string deadLetterTopic = null, Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes routes = null, System.Collections.Generic.IEnumerable scopes = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig bulkSubscribe = null) { throw null; } + public static Azure.ResourceManager.AppContainers.DotNetComponentData DotNetComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.DotNetComponentType? componentType = default(Azure.ResourceManager.AppContainers.Models.DotNetComponentType?), Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, System.Collections.Generic.IEnumerable serviceBinds = null) { throw null; } public static Azure.ResourceManager.AppContainers.JavaComponentData JavaComponentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.JavaComponentProperties properties = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.JavaComponentProperties JavaComponentProperties(string componentType = null, Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null) { throw null; } - public static Azure.ResourceManager.AppContainers.LogicAppData LogicAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } - public static Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeData LogicAppWorkflowEnvelopeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind? kind = default(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind?), Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.LabelHistoryData LabelHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable labelHistoryRecords = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LabelHistoryRecordItem LabelHistoryRecordItem(string revision = null, System.DateTimeOffset? start = default(System.DateTimeOffset?), System.DateTimeOffset? stop = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.Status? status = default(Azure.ResourceManager.AppContainers.Models.Status?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.LogicAppData LogicAppData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData) { throw null; } + public static Azure.ResourceManager.AppContainers.LogicAppData LogicAppData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.BinaryData properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.LogicAppWorkflowEnvelopeData LogicAppWorkflowEnvelopeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties LogicAppWorkflowEnvelopeProperties(System.BinaryData files = null, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState? flowState = default(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState?), Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth health = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth LogicAppWorkflowHealth(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState state = Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState.Unknown, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.ManagedCertificateProperties ManagedCertificateProperties(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateProvisioningState?), string subjectName = null, string error = null, Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation? domainControlValidation = default(Azure.ResourceManager.AppContainers.Models.ManagedCertificateDomainControlValidation?), string validationToken = null) { throw null; } - public static Azure.ResourceManager.AppContainers.SessionPoolData SessionPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier environmentId = null, Azure.ResourceManager.AppContainers.Models.ContainerType? containerType = default(Azure.ResourceManager.AppContainers.Models.ContainerType?), Azure.ResourceManager.AppContainers.Models.PoolManagementType? poolManagementType = default(Azure.ResourceManager.AppContainers.Models.PoolManagementType?), int? nodeCount = default(int?), Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration scaleConfiguration = null, System.Collections.Generic.IEnumerable secrets = null, Azure.ResourceManager.AppContainers.Models.SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration = null, Azure.ResourceManager.AppContainers.Models.CustomContainerTemplate customContainerTemplate = null, Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? sessionNetworkStatus = default(Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus?), System.Uri poolManagementEndpoint = null, Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState?), System.Collections.Generic.IEnumerable managedIdentitySettings = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.McpServerCredential McpServerCredential(string apiKey = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.McpServerSettings McpServerSettings(bool? isMcpServerEnabled = default(bool?), bool? isMcpServerApiKeyDisabled = default(bool?), string mcpServerEndpoint = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.NacosComponent NacosComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchDetails PatchDetails(string targetContainerName = null, string targetImage = null, System.DateTimeOffset lastDetectionOn = default(System.DateTimeOffset), Azure.ResourceManager.AppContainers.Models.DetectionStatus detectionStatus = default(Azure.ResourceManager.AppContainers.Models.DetectionStatus), string newImageName = null, Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer newLayer = null, Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer oldLayer = null, Azure.ResourceManager.AppContainers.Models.PatchType? patchType = default(Azure.ResourceManager.AppContainers.Models.PatchType?)) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer PatchDetailsNewLayer(string name = null, string frameworkAndVersion = null, string osAndVersion = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer PatchDetailsOldLayer(string name = null, string frameworkAndVersion = null, string osAndVersion = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchProperties PatchProperties(Azure.Core.ResourceIdentifier targetEnvironmentId = null, Azure.Core.ResourceIdentifier targetContainerAppId = null, Azure.Core.ResourceIdentifier targetRevisionId = null, Azure.ResourceManager.AppContainers.Models.PatchApplyStatus? patchApplyStatus = default(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable patchDetails = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ReplicaExecutionStatus ReplicaExecutionStatus(string name = null, System.Collections.Generic.IEnumerable containers = null) { throw null; } + public static Azure.ResourceManager.AppContainers.SessionPoolData SessionPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier environmentId = null, Azure.ResourceManager.AppContainers.Models.ContainerType? containerType = default(Azure.ResourceManager.AppContainers.Models.ContainerType?), Azure.ResourceManager.AppContainers.Models.PoolManagementType? poolManagementType = default(Azure.ResourceManager.AppContainers.Models.PoolManagementType?), int? nodeCount = default(int?), Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration scaleConfiguration = null, System.Collections.Generic.IEnumerable secrets = null, Azure.ResourceManager.AppContainers.Models.SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration = null, Azure.ResourceManager.AppContainers.Models.CustomContainerTemplate customContainerTemplate = null, Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? sessionNetworkStatus = default(Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus?), Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus templateUpdateStatus = null, System.Uri poolManagementEndpoint = null, Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState?), System.Collections.Generic.IEnumerable managedIdentitySettings = null, Azure.ResourceManager.AppContainers.Models.McpServerSettings mcpServerSettings = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.AppContainers.SessionPoolData SessionPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier environmentId, Azure.ResourceManager.AppContainers.Models.ContainerType? containerType, Azure.ResourceManager.AppContainers.Models.PoolManagementType? poolManagementType, int? nodeCount, Azure.ResourceManager.AppContainers.Models.SessionPoolScaleConfiguration scaleConfiguration, System.Collections.Generic.IEnumerable secrets, Azure.ResourceManager.AppContainers.Models.SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration, Azure.ResourceManager.AppContainers.Models.CustomContainerTemplate customContainerTemplate, Azure.ResourceManager.AppContainers.Models.SessionNetworkStatus? sessionNetworkStatus, System.Uri poolManagementEndpoint, Azure.ResourceManager.AppContainers.Models.SessionPoolProvisioningState? provisioningState, System.Collections.Generic.IEnumerable managedIdentitySettings) { throw null; } public static Azure.ResourceManager.AppContainers.Models.SpringBootAdminComponent SpringBootAdminComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.SpringCloudConfigComponent SpringCloudConfigComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null) { throw null; } public static Azure.ResourceManager.AppContainers.Models.SpringCloudEurekaComponent SpringCloudEurekaComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.SpringCloudGatewayComponent SpringCloudGatewayComponent(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState? provisioningState = default(Azure.ResourceManager.AppContainers.Models.JavaComponentProvisioningState?), System.Collections.Generic.IEnumerable configurations = null, Azure.ResourceManager.AppContainers.Models.JavaComponentPropertiesScale scale = null, System.Collections.Generic.IEnumerable serviceBinds = null, string ingressFqdn = null, System.Collections.Generic.IEnumerable springCloudGatewayRoutes = null) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus TemplatePoolStatus(int? expectedCount = default(int?), int? readyCount = default(int?), int? pendingCount = default(int?), int? imagePullFailCount = default(int?), int? crashCount = default(int?), int? allocatedCount = default(int?)) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.TemplateStatus TemplateStatus(string details = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus status = null, System.Collections.Generic.IEnumerable containers = null, int? ingressTargetPort = default(int?)) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus TemplateUpdateStatus(Azure.ResourceManager.AppContainers.Models.TemplateStatus activeTemplate = null, Azure.ResourceManager.AppContainers.Models.TemplateStatus desiredTemplate = null) { throw null; } + } + public partial class BlobStorageTokenStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BlobStorageTokenStore() { } + public System.Uri BlobContainerUri { get { throw null; } set { } } + public string ClientId { get { throw null; } set { } } + public string ManagedIdentityResourceId { get { throw null; } set { } } + public string SasUrlSettingName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BlobStorageTokenStore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BlobStorageTokenStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BuildConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuildConfiguration() { } + public string BaseOS { get { throw null; } set { } } + public System.Collections.Generic.IList EnvironmentVariables { get { throw null; } } + public string Platform { get { throw null; } set { } } + public string PlatformVersion { get { throw null; } set { } } + public System.Collections.Generic.IList PreBuildSteps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuilderProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuilderProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuilderProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuilderResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BuilderResourcePatch() { } + public Azure.Core.ResourceIdentifier EnvironmentId { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuilderResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.BuildProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.BuildProvisioningState left, Azure.ResourceManager.AppContainers.Models.BuildProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BuildStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BuildStatus(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus InProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.BuildStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.BuildStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.BuildStatus left, Azure.ResourceManager.AppContainers.Models.BuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.BuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.BuildStatus left, Azure.ResourceManager.AppContainers.Models.BuildStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BuildToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BuildToken() { } + public System.DateTimeOffset? Expires { get { throw null; } } + public string Token { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.BuildToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CertificateType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CertificateType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.CertificateType ImagePullTrustedCA { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.CertificateType ServerSSLCertificate { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.CertificateType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.CertificateType left, Azure.ResourceManager.AppContainers.Models.CertificateType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.CertificateType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.CertificateType left, Azure.ResourceManager.AppContainers.Models.CertificateType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CircuitBreakerPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CircuitBreakerPolicy() { } + public int? ConsecutiveErrors { get { throw null; } set { } } + public int? IntervalInSeconds { get { throw null; } set { } } + public int? MaxEjectionPercent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.CircuitBreakerPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConnectedEnvironmentDaprComponentProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConnectedEnvironmentDaprComponentProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentDaprComponentProvisioningState right) { throw null; } + public override string ToString() { throw null; } } public partial class ConnectedEnvironmentStorageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1786,6 +2559,7 @@ public ConnectedEnvironmentStorageProperties() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppAzureFileProperties AzureFile { get { throw null; } set { } } public string DeploymentErrors { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.SmbStorage Smb { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ConnectedEnvironmentStorageProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1838,6 +2612,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ContainerAppActiveRevisionsMode(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode Labels { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode Multiple { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode Single { get { throw null; } } public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode other) { throw null; } @@ -2049,6 +2824,7 @@ public ContainerAppBaseContainer() { } public System.Collections.Generic.IList Command { get { throw null; } } public System.Collections.Generic.IList Env { get { throw null; } } public string Image { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ImageType? ImageType { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.AppContainerResources Resources { get { throw null; } set { } } public System.Collections.Generic.IList VolumeMounts { get { throw null; } } @@ -2061,9 +2837,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ContainerAppBillingMeter : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ContainerAppBillingMeter() { } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties Properties { get { throw null; } set { } } + internal ContainerAppBillingMeter() { } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2093,12 +2869,12 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public partial class ContainerAppBillingMeterProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ContainerAppBillingMeterProperties() { } + internal ContainerAppBillingMeterProperties() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public string MeterType { get { throw null; } set { } } - public string WorkloadProfileCategory { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get { throw null; } } + public string DisplayName { get { throw null; } } + public string MeterType { get { throw null; } } + public string WorkloadProfileCategory { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2133,6 +2909,7 @@ public partial class ContainerAppCertificateProperties : System.ClientModel.Prim { public ContainerAppCertificateProperties() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppCertificateKeyVaultProperties CertificateKeyVaultProperties { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.CertificateType? CertificateType { get { throw null; } set { } } public string DeploymentErrors { get { throw null; } } public System.DateTimeOffset? ExpireOn { get { throw null; } } public System.DateTimeOffset? IssueOn { get { throw null; } } @@ -2191,13 +2968,15 @@ public partial class ContainerAppConfiguration : System.ClientModel.Primitives.I public ContainerAppConfiguration() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppActiveRevisionsMode? ActiveRevisionsMode { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppDaprConfiguration Dapr { get { throw null; } set { } } - public bool? EnableMetrics { get { throw null; } set { } } public System.Collections.Generic.IList IdentitySettings { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppIngressConfiguration Ingress { get { throw null; } set { } } public int? MaxInactiveRevisions { get { throw null; } set { } } public System.Collections.Generic.IList Registries { get { throw null; } } + public int? RevisionTransitionThreshold { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.Runtime Runtime { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } public string ServiceType { get { throw null; } set { } } + public string TargetLabel { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2774,7 +3553,9 @@ public partial class ContainerAppGitHubActionConfiguration : System.ClientModel. { public ContainerAppGitHubActionConfiguration() { } public Azure.ResourceManager.AppContainers.Models.ContainerAppCredentials AzureCredentials { get { throw null; } set { } } + public System.Collections.Generic.IList BuildEnvironmentVariables { get { throw null; } } public string ContextPath { get { throw null; } set { } } + public string DockerfilePath { get { throw null; } set { } } public string GitHubPersonalAccessToken { get { throw null; } set { } } public string Image { get { throw null; } set { } } public string OS { get { throw null; } set { } } @@ -2951,6 +3732,7 @@ public ContainerAppHttpRouteTarget(string containerApp) { } public string ContainerApp { get { throw null; } set { } } public string Label { get { throw null; } set { } } public string Revision { get { throw null; } set { } } + public int? Weight { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppHttpRouteTarget System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3085,6 +3867,7 @@ public ContainerAppIngressConfiguration() { } public System.Collections.Generic.IList IPSecurityRestrictions { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.Affinity? StickySessionsAffinity { get { throw null; } set { } } public int? TargetPort { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme? TargetPortHttpScheme { get { throw null; } set { } } public System.Collections.Generic.IList Traffic { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.ContainerAppIngressTransportMethod? Transport { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3214,6 +3997,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerAppJobPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppJobPatch() { } + public Azure.ResourceManager.AppContainers.Models.ContainerAppExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.AppContainers.Models.ContainerAppJobPatchProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } @@ -3339,7 +4123,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ContainerAppKind(string value) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.ContainerAppKind Functionapp { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppKind Workflowapp { get { throw null; } } public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppKind other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -3355,6 +4138,7 @@ public partial class ContainerAppLogAnalyticsConfiguration : System.ClientModel. { public ContainerAppLogAnalyticsConfiguration() { } public string CustomerId { get { throw null; } set { } } + public bool? DynamicJsonColumns { get { throw null; } set { } } public string SharedKey { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.ContainerAppLogAnalyticsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3790,6 +4574,7 @@ public partial class ContainerAppReplicaContainer : System.ClientModel.Primitive { public ContainerAppReplicaContainer() { } public string ContainerId { get { throw null; } set { } } + public string DebugEndpoint { get { throw null; } } public string ExecEndpoint { get { throw null; } } public bool? IsReady { get { throw null; } set { } } public bool? IsStarted { get { throw null; } set { } } @@ -3910,6 +4695,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus left, Azure.ResourceManager.AppContainers.Models.ContainerAppRunningStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class ContainerAppsBuildConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ContainerAppsBuildConfiguration() { } + public string BaseOS { get { throw null; } } + public System.Collections.Generic.IReadOnlyList EnvironmentVariables { get { throw null; } } + public string Platform { get { throw null; } } + public string PlatformVersion { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PreBuildSteps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerAppsBuildConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerAppScale : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppScale() { } @@ -3981,6 +4781,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerAppServiceBind : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppServiceBind() { } + public string ClientType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary CustomizedKeys { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4020,6 +4822,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType EmptyDir { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType NfsAzureFile { get { throw null; } } public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType Secret { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType Smb { get { throw null; } } public bool Equals(Azure.ResourceManager.AppContainers.Models.ContainerAppStorageType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -4075,7 +4878,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerAppTokenStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerAppTokenStore() { } - public string AzureBlobStorageSasUrlSettingName { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.BlobStorageTokenStore AzureBlobStorage { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public double? TokenRefreshExtensionHours { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4212,6 +5015,7 @@ public partial class ContainerAppWorkloadProfile : System.ClientModel.Primitives { public ContainerAppWorkloadProfile(string workloadProfileType, int minimumCount, int maximumCount) { } public ContainerAppWorkloadProfile(string name, string workloadProfileType) { } + public bool? EnableFips { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public int MaximumCount { get { throw null; } set { } } public int? MaximumNodeCount { get { throw null; } set { } } @@ -4265,6 +5069,44 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ContainerExecutionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ContainerExecutionStatus() { } + public string AdditionalInformation { get { throw null; } } + public int? Code { get { throw null; } } + public string Name { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerExecutionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerExecutionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerRegistry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerRegistry(string containerRegistryServer, Azure.Core.ResourceIdentifier identityResourceId) { } + public string ContainerRegistryServer { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier IdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerRegistryWithCustomImage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerRegistryWithCustomImage(string server) { } + public string Image { get { throw null; } set { } } + public string Server { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ContainerRegistryWithCustomImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ContainerType : System.IEquatable { @@ -4311,45 +5153,265 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DaprComponentProvisioningState : System.IEquatable + public partial class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DaprComponentProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState InProgress { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DaprComponentProvisioningState right) { throw null; } - public override string ToString() { throw null; } + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() { } + public int? ConsecutiveErrors { get { throw null; } set { } } + public int? IntervalInSeconds { get { throw null; } set { } } + public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class EncryptionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DaprComponentResiliencyPolicyConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public EncryptionSettings() { } - public string ContainerAppAuthEncryptionSecretName { get { throw null; } set { } } - public string ContainerAppAuthSigningSecretName { get { throw null; } set { } } + public DaprComponentResiliencyPolicyConfiguration() { } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration CircuitBreakerPolicy { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration HttpRetryPolicy { get { throw null; } set { } } + public int? ResponseTimeoutInSeconds { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class EventTriggerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public EventTriggerConfiguration() { } - public int? Parallelism { get { throw null; } set { } } - public int? ReplicaCompletionCount { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.ContainerAppJobScale Scale { get { throw null; } set { } } + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() { } + public int? InitialDelayInMilliseconds { get { throw null; } set { } } + public int? MaxIntervalInMilliseconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration() { } + public int? MaxRetries { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration RetryBackOff { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprComponentServiceBinding : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprComponentServiceBinding() { } + public Azure.ResourceManager.AppContainers.Models.DaprServiceBindMetadata Metadata { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ServiceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentServiceBinding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprComponentServiceBinding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprServiceBindMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprServiceBindMetadata() { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprServiceBindMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprServiceBindMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionBulkSubscribeConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionBulkSubscribeConfig() { } + public bool? IsEnabled { get { throw null; } set { } } + public int? MaxAwaitDurationMs { get { throw null; } set { } } + public int? MaxMessagesCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionBulkSubscribeConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionRouteRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionRouteRule() { } + public string Match { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRouteRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRouteRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DaprSubscriptionRoutes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DaprSubscriptionRoutes() { } + public string Default { get { throw null; } set { } } + public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DaprSubscriptionRoutes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataDogConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataDogConfiguration() { } + public string Key { get { throw null; } set { } } + public string Site { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DataDogConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DataDogConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DestinationsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DestinationsConfiguration() { } + public Azure.ResourceManager.AppContainers.Models.DataDogConfiguration DataDogConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList OtlpConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DestinationsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DestinationsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DetectionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DetectionStatus(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.DetectionStatus Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DetectionStatus RegistryLoginFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DetectionStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.DetectionStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DetectionStatus left, Azure.ResourceManager.AppContainers.Models.DetectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.DetectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DetectionStatus left, Azure.ResourceManager.AppContainers.Models.DetectionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiskEncryptionConfigurationKeyVaultConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiskEncryptionConfigurationKeyVaultConfiguration() { } + public Azure.Core.ResourceIdentifier AuthIdentity { get { throw null; } set { } } + public System.Uri KeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DiskEncryptionConfigurationKeyVaultConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DotNetComponentConfigurationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DotNetComponentConfigurationProperty() { } + public string PropertyName { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentConfigurationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentConfigurationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DotNetComponentProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DotNetComponentProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState left, Azure.ResourceManager.AppContainers.Models.DotNetComponentProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DotNetComponentServiceBind : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DotNetComponentServiceBind() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentServiceBind System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.DotNetComponentServiceBind System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DotNetComponentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DotNetComponentType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.DotNetComponentType AspireDashboard { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.DotNetComponentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.DotNetComponentType left, Azure.ResourceManager.AppContainers.Models.DotNetComponentType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.DotNetComponentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.DotNetComponentType left, Azure.ResourceManager.AppContainers.Models.DotNetComponentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EncryptionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EncryptionSettings() { } + public string ContainerAppAuthEncryptionSecretName { get { throw null; } set { } } + public string ContainerAppAuthSigningSecretName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EncryptionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EnvironmentVariable : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EnvironmentVariable(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EnvironmentVariable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.EnvironmentVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EventTriggerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EventTriggerConfiguration() { } + public int? Parallelism { get { throw null; } set { } } + public int? ReplicaCompletionCount { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppJobScale Scale { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.EventTriggerConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4357,6 +5419,104 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class Header : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Header() { } + public string Key { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Header System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Header System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HeaderMatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HeaderMatch() { } + public string ExactMatch { get { throw null; } set { } } + public string Header { get { throw null; } set { } } + public string PrefixMatch { get { throw null; } set { } } + public string RegexMatch { get { throw null; } set { } } + public string SuffixMatch { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HeaderMatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HeaderMatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HttpConnectionPool : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HttpConnectionPool() { } + public int? Http1MaxPendingRequests { get { throw null; } set { } } + public int? Http2MaxRequests { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpConnectionPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpConnectionPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HttpGet : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HttpGet(System.Uri uri) { } + public string FileName { get { throw null; } set { } } + public System.Collections.Generic.IList Headers { get { throw null; } } + public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpGet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpGet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HttpRetryPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HttpRetryPolicy() { } + public System.Collections.Generic.IList Errors { get { throw null; } } + public System.Collections.Generic.IList Headers { get { throw null; } } + public System.Collections.Generic.IList HttpStatusCodes { get { throw null; } } + public long? InitialDelayInMilliseconds { get { throw null; } set { } } + public long? MaxIntervalInMilliseconds { get { throw null; } set { } } + public int? MaxRetries { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.HttpRetryPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.ImageType CloudBuild { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.ImageType ContainerImage { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.ImageType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.ImageType left, Azure.ResourceManager.AppContainers.Models.ImageType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.ImageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.ImageType left, Azure.ResourceManager.AppContainers.Models.ImageType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class IngressConfigurationScale : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IngressConfigurationScale() { } + public int? MaxReplicas { get { throw null; } set { } } + public int? MinReplicas { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.IngressConfigurationScale System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.IngressConfigurationScale System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class IngressPortMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IngressPortMapping(bool external, int targetPort) { } @@ -4370,6 +5530,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IngressTargetPortHttpScheme : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IngressTargetPortHttpScheme(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme Http { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme Https { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme left, Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme left, Azure.ResourceManager.AppContainers.Models.IngressTargetPortHttpScheme right) { throw null; } + public override string ToString() { throw null; } + } public partial class JavaComponentConfigurationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public JavaComponentConfigurationProperty() { } @@ -4505,12 +5683,97 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState left, Azure.ResourceManager.AppContainers.Models.JobExecutionRunningState right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobRunningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobRunningState(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.JobRunningState Progressing { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobRunningState Ready { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.JobRunningState Suspended { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.JobRunningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.JobRunningState left, Azure.ResourceManager.AppContainers.Models.JobRunningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.JobRunningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.JobRunningState left, Azure.ResourceManager.AppContainers.Models.JobRunningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LabelHistoryRecordItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LabelHistoryRecordItem() { } + public string Revision { get { throw null; } } + public System.DateTimeOffset? Start { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.Status? Status { get { throw null; } } + public System.DateTimeOffset? Stop { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LabelHistoryRecordItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LabelHistoryRecordItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Level : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Level(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.Level Debug { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Error { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Info { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Off { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Trace { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Level Warn { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.Level other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.Level left, Azure.ResourceManager.AppContainers.Models.Level right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.Level (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.Level left, Azure.ResourceManager.AppContainers.Models.Level right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoggerSetting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LoggerSetting(string logger, Azure.ResourceManager.AppContainers.Models.Level level) { } + public Azure.ResourceManager.AppContainers.Models.Level Level { get { throw null; } set { } } + public string Logger { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LoggerSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.LoggerSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LogicAppsProxyMethod : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LogicAppsProxyMethod(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod GET { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod Post { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod left, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod left, Azure.ResourceManager.AppContainers.Models.LogicAppsProxyMethod right) { throw null; } + public override string ToString() { throw null; } + } public partial class LogicAppWorkflowEnvelopeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogicAppWorkflowEnvelopeProperties() { } - public System.BinaryData Files { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState? FlowState { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth Health { get { throw null; } set { } } + internal LogicAppWorkflowEnvelopeProperties() { } + public System.BinaryData Files { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowState? FlowState { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth Health { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowEnvelopeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4520,9 +5783,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class LogicAppWorkflowHealth : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogicAppWorkflowHealth(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState state) { } - public Azure.ResourceManager.AppContainers.Models.WorkflowErrorEntity Error { get { throw null; } set { } } - public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState State { get { throw null; } set { } } + internal LogicAppWorkflowHealth() { } + public Azure.ResponseError Error { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealthState State { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4538,25 +5801,6 @@ public enum LogicAppWorkflowHealthState Unhealthy = 3, } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LogicAppWorkflowKind : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LogicAppWorkflowKind(string value) { throw null; } - public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind Agentic { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind Stateful { get { throw null; } } - public static Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind Stateless { get { throw null; } } - public bool Equals(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind left, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind right) { throw null; } - public static implicit operator Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind left, Azure.ResourceManager.AppContainers.Models.LogicAppWorkflowKind right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LogicAppWorkflowState : System.IEquatable { private readonly object _dummy; @@ -4617,6 +5861,7 @@ public partial class ManagedEnvironmentIngressConfiguration : System.ClientModel public ManagedEnvironmentIngressConfiguration() { } public int? HeaderCountLimit { get { throw null; } set { } } public int? RequestIdleTimeout { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.IngressConfigurationScale Scale { get { throw null; } set { } } public int? TerminationGracePeriodSeconds { get { throw null; } set { } } public string WorkloadProfileName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4661,6 +5906,217 @@ public enum ManagedEnvironmentWeekDay Saturday = 5, Sunday = 6, } + public partial class McpServerCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal McpServerCredential() { } + public string ApiKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class McpServerSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public McpServerSettings() { } + public bool? IsMcpServerApiKeyDisabled { get { throw null; } set { } } + public bool? IsMcpServerEnabled { get { throw null; } set { } } + public string McpServerEndpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.McpServerSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MetricsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MetricsConfiguration() { } + public System.Collections.Generic.IList Destinations { get { throw null; } } + public bool? IncludeKeda { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.MetricsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.MetricsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NacosComponent : Azure.ResourceManager.AppContainers.Models.JavaComponentProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NacosComponent() { } + public string IngressFqdn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.NacosComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.NacosComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OpenTelemetryConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OpenTelemetryConfiguration() { } + public Azure.ResourceManager.AppContainers.Models.DestinationsConfiguration DestinationsConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList LogsDestinations { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.MetricsConfiguration MetricsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.TracesConfiguration TracesConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OpenTelemetryConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OtlpConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OtlpConfiguration() { } + public string Endpoint { get { throw null; } set { } } + public System.Collections.Generic.IList Headers { get { throw null; } } + public bool? Insecure { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OtlpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.OtlpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PatchApplyStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PatchApplyStatus(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus CreatingRevision { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus ImagePushPullFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus ManuallySkipped { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus RebaseFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus RebaseInProgress { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus RevisionCreationFailed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchApplyStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus left, Azure.ResourceManager.AppContainers.Models.PatchApplyStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.PatchApplyStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PatchApplyStatus left, Azure.ResourceManager.AppContainers.Models.PatchApplyStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PatchDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchDetails() { } + public Azure.ResourceManager.AppContainers.Models.DetectionStatus DetectionStatus { get { throw null; } } + public System.DateTimeOffset LastDetectionOn { get { throw null; } } + public string NewImageName { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer NewLayer { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer OldLayer { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchType? PatchType { get { throw null; } } + public string TargetContainerName { get { throw null; } } + public string TargetImage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PatchDetailsNewLayer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchDetailsNewLayer() { } + public string FrameworkAndVersion { get { throw null; } } + public string Name { get { throw null; } } + public string OSAndVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsNewLayer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PatchDetailsOldLayer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchDetailsOldLayer() { } + public string FrameworkAndVersion { get { throw null; } } + public string Name { get { throw null; } } + public string OSAndVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchDetailsOldLayer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PatchingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PatchingMode(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchingMode Automatic { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchingMode Disabled { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchingMode Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.PatchingMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.PatchingMode left, Azure.ResourceManager.AppContainers.Models.PatchingMode right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.PatchingMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PatchingMode left, Azure.ResourceManager.AppContainers.Models.PatchingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PatchProperties() { } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.DateTimeOffset? LastModifiedOn { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.PatchApplyStatus? PatchApplyStatus { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PatchDetails { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetContainerAppId { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetEnvironmentId { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetRevisionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PatchSkipConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PatchSkipConfig() { } + public bool? Skip { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchSkipConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PatchSkipConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PatchType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PatchType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.PatchType FrameworkAndOSSecurity { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchType FrameworkSecurity { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchType OSSecurity { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.PatchType Other { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.PatchType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.PatchType left, Azure.ResourceManager.AppContainers.Models.PatchType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.PatchType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PatchType left, Azure.ResourceManager.AppContainers.Models.PatchType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PoolManagementType : System.IEquatable { @@ -4679,6 +6135,31 @@ public enum ManagedEnvironmentWeekDay public static bool operator !=(Azure.ResourceManager.AppContainers.Models.PoolManagementType left, Azure.ResourceManager.AppContainers.Models.PoolManagementType right) { throw null; } public override string ToString() { throw null; } } + public partial class PreBuildStep : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PreBuildStep() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.HttpGet HttpGet { get { throw null; } set { } } + public System.Collections.Generic.IList Scripts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PreBuildStep System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.PreBuildStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReplicaExecutionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReplicaExecutionStatus() { } + public System.Collections.Generic.IReadOnlyList Containers { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ReplicaExecutionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ReplicaExecutionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RevisionRunningState : System.IEquatable { @@ -4701,6 +6182,57 @@ public enum ManagedEnvironmentWeekDay public static bool operator !=(Azure.ResourceManager.AppContainers.Models.RevisionRunningState left, Azure.ResourceManager.AppContainers.Models.RevisionRunningState right) { throw null; } public override string ToString() { throw null; } } + public partial class Runtime : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Runtime() { } + public bool? AutoConfigureDataProtection { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.RuntimeJava Java { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Runtime System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.Runtime System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RuntimeJava : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RuntimeJava() { } + public bool? EnableMetrics { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.RuntimeJavaAgent JavaAgent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJava System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJava System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RuntimeJavaAgent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RuntimeJavaAgent() { } + public bool? IsEnabled { get { throw null; } set { } } + public System.Collections.Generic.IList LoggingLoggerSettings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJavaAgent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.RuntimeJavaAgent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ScgRoute : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScgRoute(string id, System.Uri uri) { } + public System.Collections.Generic.IList Filters { get { throw null; } } + public string Id { get { throw null; } set { } } + public long? Order { get { throw null; } set { } } + public System.Collections.Generic.IList Predicates { get { throw null; } } + public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ScgRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.ScgRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SecretVolumeItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecretVolumeItem() { } @@ -4721,6 +6253,7 @@ public SessionContainer() { } public System.Collections.Generic.IList Env { get { throw null; } } public string Image { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Probes { get { throw null; } } public Azure.ResourceManager.AppContainers.Models.SessionContainerResources Resources { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppContainers.Models.SessionContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4864,6 +6397,82 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SessionProbe : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbe() { } + public int? FailureThreshold { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGet HttpGet { get { throw null; } set { } } + public int? InitialDelaySeconds { get { throw null; } set { } } + public int? PeriodSeconds { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.SessionProbeType? ProbeType { get { throw null; } set { } } + public int? SuccessThreshold { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.SessionProbeTcpSocket TcpSocket { get { throw null; } set { } } + public long? TerminationGracePeriodSeconds { get { throw null; } set { } } + public int? TimeoutSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbe System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SessionProbeHttpGet : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbeHttpGet(int port) { } + public string Host { get { throw null; } set { } } + public System.Collections.Generic.IList HttpHeaders { get { throw null; } } + public string Path { get { throw null; } set { } } + public int Port { get { throw null; } set { } } + public Azure.ResourceManager.AppContainers.Models.ContainerAppHttpScheme? Scheme { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SessionProbeHttpGetHttpHeadersItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbeHttpGetHttpHeadersItem(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGetHttpHeadersItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeHttpGetHttpHeadersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SessionProbeTcpSocket : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SessionProbeTcpSocket(int port) { } + public string Host { get { throw null; } set { } } + public int Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeTcpSocket System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SessionProbeTcpSocket System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SessionProbeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SessionProbeType(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.SessionProbeType Liveness { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.SessionProbeType Startup { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.SessionProbeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.SessionProbeType left, Azure.ResourceManager.AppContainers.Models.SessionProbeType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.SessionProbeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.SessionProbeType left, Azure.ResourceManager.AppContainers.Models.SessionProbeType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SessionRegistryCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SessionRegistryCredentials() { } @@ -4878,6 +6487,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SmbStorage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SmbStorage() { } + public Azure.ResourceManager.AppContainers.Models.ContainerAppAccessMode? AccessMode { get { throw null; } set { } } + public string Domain { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string ShareName { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SmbStorage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SmbStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SpringBootAdminComponent : Azure.ResourceManager.AppContainers.Models.JavaComponentProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SpringBootAdminComponent() { } @@ -4910,22 +6535,115 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class WorkflowErrorEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SpringCloudGatewayComponent : Azure.ResourceManager.AppContainers.Models.JavaComponentProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public WorkflowErrorEntity() { } - public string Code { get { throw null; } set { } } - public System.Collections.Generic.IList Details { get { throw null; } } - public string ExtendedCode { get { throw null; } set { } } - public System.Collections.Generic.IList InnerErrors { get { throw null; } } - public string Message { get { throw null; } set { } } - public string MessageTemplate { get { throw null; } set { } } - public System.Collections.Generic.IList Parameters { get { throw null; } } - public string Target { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.WorkflowErrorEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.AppContainers.Models.WorkflowErrorEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public SpringCloudGatewayComponent() { } + public string IngressFqdn { get { throw null; } } + public System.Collections.Generic.IList SpringCloudGatewayRoutes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SpringCloudGatewayComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.SpringCloudGatewayComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Status : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Status(string value) { throw null; } + public static Azure.ResourceManager.AppContainers.Models.Status Failed { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Status Starting { get { throw null; } } + public static Azure.ResourceManager.AppContainers.Models.Status Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppContainers.Models.Status other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.AppContainers.Models.Status left, Azure.ResourceManager.AppContainers.Models.Status right) { throw null; } + public static implicit operator Azure.ResourceManager.AppContainers.Models.Status (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppContainers.Models.Status left, Azure.ResourceManager.AppContainers.Models.Status right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TemplatePoolStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TemplatePoolStatus() { } + public int? AllocatedCount { get { throw null; } } + public int? CrashCount { get { throw null; } } + public int? ExpectedCount { get { throw null; } } + public int? ImagePullFailCount { get { throw null; } } + public int? PendingCount { get { throw null; } } + public int? ReadyCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TemplateStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TemplateStatus() { } + public System.Collections.Generic.IReadOnlyList Containers { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Details { get { throw null; } } + public int? IngressTargetPort { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.TemplatePoolStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TemplateUpdateStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TemplateUpdateStatus() { } + public Azure.ResourceManager.AppContainers.Models.TemplateStatus ActiveTemplate { get { throw null; } } + public Azure.ResourceManager.AppContainers.Models.TemplateStatus DesiredTemplate { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TemplateUpdateStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TimeoutPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TimeoutPolicy() { } + public int? ConnectionTimeoutInSeconds { get { throw null; } set { } } + public int? ResponseTimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TimeoutPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TimeoutPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesConfiguration() { } + public System.Collections.Generic.IList Destinations { get { throw null; } } + public bool? IncludeDapr { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TracesConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.TracesConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowArtifacts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowArtifacts() { } + public System.BinaryData AppSettings { get { throw null; } set { } } + public System.BinaryData Files { get { throw null; } set { } } + public System.Collections.Generic.IList FilesToDelete { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppContainers.Models.WorkflowArtifacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterProperties.cs index cfe052725863..efbd95e3dbc5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Custom/ContainerAppBillingMeterProperties.cs @@ -13,6 +13,6 @@ public partial class ContainerAppBillingMeterProperties { /// billing category for container app. [EditorBrowsable(EditorBrowsableState.Never)] - public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get => WorkloadProfileCategory; set => WorkloadProfileCategory = value?.ToString(); } + public Azure.ResourceManager.AppContainers.Models.ContainerAppBillingMeterCategory? Category { get => WorkloadProfileCategory; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyCollection.cs new file mode 100644 index 000000000000..9bc5277fefbb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAppResiliencies method from an instance of . + /// + public partial class AppResiliencyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _appResiliencyClientDiagnostics; + private readonly AppResiliencyRestOperations _appResiliencyRestClient; + + /// Initializes a new instance of the class for mocking. + protected AppResiliencyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AppResiliencyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _appResiliencyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", AppResiliencyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AppResiliencyResource.ResourceType, out string appResiliencyApiVersion); + _appResiliencyRestClient = new AppResiliencyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appResiliencyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppResource.ResourceType), nameof(id)); + } + + /// + /// Create or update container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the resiliency policy. + /// The resiliency policy to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _appResiliencyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var uri = _appResiliencyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new AppResiliencyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the resiliency policy. + /// The resiliency policy to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _appResiliencyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var uri = _appResiliencyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new AppResiliencyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.Get"); + scope.Start(); + try + { + var response = await _appResiliencyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.Get"); + scope.Start(); + try + { + var response = _appResiliencyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List container app resiliency policies. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies + /// + /// + /// Operation Id + /// AppResiliency_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _appResiliencyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appResiliencyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AppResiliencyResource(Client, AppResiliencyData.DeserializeAppResiliencyData(e)), _appResiliencyClientDiagnostics, Pipeline, "AppResiliencyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List container app resiliency policies. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies + /// + /// + /// Operation Id + /// AppResiliency_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _appResiliencyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appResiliencyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AppResiliencyResource(Client, AppResiliencyData.DeserializeAppResiliencyData(e)), _appResiliencyClientDiagnostics, Pipeline, "AppResiliencyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.Exists"); + scope.Start(); + try + { + var response = await _appResiliencyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.Exists"); + scope.Start(); + try + { + var response = _appResiliencyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _appResiliencyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _appResiliencyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyData.Serialization.cs new file mode 100644 index 000000000000..9dcdb9794065 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyData.Serialization.cs @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class AppResiliencyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppResiliencyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(TimeoutPolicy)) + { + writer.WritePropertyName("timeoutPolicy"u8); + writer.WriteObjectValue(TimeoutPolicy, options); + } + if (Optional.IsDefined(HttpRetryPolicy)) + { + writer.WritePropertyName("httpRetryPolicy"u8); + writer.WriteObjectValue(HttpRetryPolicy, options); + } + if (Optional.IsDefined(TcpRetryPolicy)) + { + writer.WritePropertyName("tcpRetryPolicy"u8); + writer.WriteObjectValue(TcpRetryPolicy, options); + } + if (Optional.IsDefined(CircuitBreakerPolicy)) + { + writer.WritePropertyName("circuitBreakerPolicy"u8); + writer.WriteObjectValue(CircuitBreakerPolicy, options); + } + if (Optional.IsDefined(HttpConnectionPool)) + { + writer.WritePropertyName("httpConnectionPool"u8); + writer.WriteObjectValue(HttpConnectionPool, options); + } + if (Optional.IsDefined(TcpConnectionPool)) + { + writer.WritePropertyName("tcpConnectionPool"u8); + writer.WriteObjectValue(TcpConnectionPool, options); + } + writer.WriteEndObject(); + } + + AppResiliencyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppResiliencyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAppResiliencyData(document.RootElement, options); + } + + internal static AppResiliencyData DeserializeAppResiliencyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + TimeoutPolicy timeoutPolicy = default; + HttpRetryPolicy httpRetryPolicy = default; + TcpRetryPolicy tcpRetryPolicy = default; + CircuitBreakerPolicy circuitBreakerPolicy = default; + HttpConnectionPool httpConnectionPool = default; + TcpConnectionPool tcpConnectionPool = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("timeoutPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeoutPolicy = TimeoutPolicy.DeserializeTimeoutPolicy(property0.Value, options); + continue; + } + if (property0.NameEquals("httpRetryPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpRetryPolicy = HttpRetryPolicy.DeserializeHttpRetryPolicy(property0.Value, options); + continue; + } + if (property0.NameEquals("tcpRetryPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tcpRetryPolicy = TcpRetryPolicy.DeserializeTcpRetryPolicy(property0.Value, options); + continue; + } + if (property0.NameEquals("circuitBreakerPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreakerPolicy = CircuitBreakerPolicy.DeserializeCircuitBreakerPolicy(property0.Value, options); + continue; + } + if (property0.NameEquals("httpConnectionPool"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpConnectionPool = HttpConnectionPool.DeserializeHttpConnectionPool(property0.Value, options); + continue; + } + if (property0.NameEquals("tcpConnectionPool"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tcpConnectionPool = TcpConnectionPool.DeserializeTcpConnectionPool(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AppResiliencyData( + id, + name, + type, + systemData, + timeoutPolicy, + httpRetryPolicy, + tcpRetryPolicy, + circuitBreakerPolicy, + httpConnectionPool, + tcpConnectionPool, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeoutPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeoutPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeoutPolicy)) + { + builder.Append(" timeoutPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, TimeoutPolicy, options, 4, false, " timeoutPolicy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpRetryPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpRetryPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpRetryPolicy)) + { + builder.Append(" httpRetryPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, HttpRetryPolicy, options, 4, false, " httpRetryPolicy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("TcpRetryMaxConnectAttempts", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tcpRetryPolicy: "); + builder.AppendLine("{"); + builder.AppendLine(" tcpRetryPolicy: {"); + builder.Append(" maxConnectAttempts: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(TcpRetryPolicy)) + { + builder.Append(" tcpRetryPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, TcpRetryPolicy, options, 4, false, " tcpRetryPolicy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CircuitBreakerPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" circuitBreakerPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CircuitBreakerPolicy)) + { + builder.Append(" circuitBreakerPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, CircuitBreakerPolicy, options, 4, false, " circuitBreakerPolicy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpConnectionPool), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpConnectionPool: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpConnectionPool)) + { + builder.Append(" httpConnectionPool: "); + BicepSerializationHelpers.AppendChildObject(builder, HttpConnectionPool, options, 4, false, " httpConnectionPool: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("MaxConnections", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tcpConnectionPool: "); + builder.AppendLine("{"); + builder.AppendLine(" tcpConnectionPool: {"); + builder.Append(" maxConnections: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(TcpConnectionPool)) + { + builder.Append(" tcpConnectionPool: "); + BicepSerializationHelpers.AppendChildObject(builder, TcpConnectionPool, options, 4, false, " tcpConnectionPool: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AppResiliencyData)} does not support writing '{options.Format}' format."); + } + } + + AppResiliencyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAppResiliencyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AppResiliencyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyData.cs new file mode 100644 index 000000000000..ceed4f6c624b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyData.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the AppResiliency data model. + /// Configuration to setup App Resiliency + /// + public partial class AppResiliencyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AppResiliencyData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Policy to set request timeouts. + /// Policy that defines http request retry conditions. + /// Policy that defines tcp request retry conditions. + /// Policy that defines circuit breaker conditions. + /// Defines parameters for http connection pooling. + /// Defines parameters for tcp connection pooling. + /// Keeps track of any properties unknown to the library. + internal AppResiliencyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TimeoutPolicy timeoutPolicy, HttpRetryPolicy httpRetryPolicy, TcpRetryPolicy tcpRetryPolicy, CircuitBreakerPolicy circuitBreakerPolicy, HttpConnectionPool httpConnectionPool, TcpConnectionPool tcpConnectionPool, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + TimeoutPolicy = timeoutPolicy; + HttpRetryPolicy = httpRetryPolicy; + TcpRetryPolicy = tcpRetryPolicy; + CircuitBreakerPolicy = circuitBreakerPolicy; + HttpConnectionPool = httpConnectionPool; + TcpConnectionPool = tcpConnectionPool; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Policy to set request timeouts. + [WirePath("properties.timeoutPolicy")] + public TimeoutPolicy TimeoutPolicy { get; set; } + /// Policy that defines http request retry conditions. + [WirePath("properties.httpRetryPolicy")] + public HttpRetryPolicy HttpRetryPolicy { get; set; } + /// Policy that defines tcp request retry conditions. + internal TcpRetryPolicy TcpRetryPolicy { get; set; } + /// Maximum number of attempts to connect to the tcp service. + [WirePath("properties.tcpRetryPolicy.maxConnectAttempts")] + public int? TcpRetryMaxConnectAttempts + { + get => TcpRetryPolicy is null ? default : TcpRetryPolicy.MaxConnectAttempts; + set + { + if (TcpRetryPolicy is null) + TcpRetryPolicy = new TcpRetryPolicy(); + TcpRetryPolicy.MaxConnectAttempts = value; + } + } + + /// Policy that defines circuit breaker conditions. + [WirePath("properties.circuitBreakerPolicy")] + public CircuitBreakerPolicy CircuitBreakerPolicy { get; set; } + /// Defines parameters for http connection pooling. + [WirePath("properties.httpConnectionPool")] + public HttpConnectionPool HttpConnectionPool { get; set; } + /// Defines parameters for tcp connection pooling. + internal TcpConnectionPool TcpConnectionPool { get; set; } + /// Maximum number of tcp connections allowed. + [WirePath("properties.tcpConnectionPool.maxConnections")] + public int? MaxConnections + { + get => TcpConnectionPool is null ? default : TcpConnectionPool.MaxConnections; + set + { + if (TcpConnectionPool is null) + TcpConnectionPool = new TcpConnectionPool(); + TcpConnectionPool.MaxConnections = value; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyResource.Serialization.cs new file mode 100644 index 000000000000..0c028ea87f68 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class AppResiliencyResource : IJsonModel + { + private static AppResiliencyData s_dataDeserializationInstance; + private static AppResiliencyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AppResiliencyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + AppResiliencyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyResource.cs new file mode 100644 index 000000000000..c4e38343e11f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/AppResiliencyResource.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing an AppResiliency along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAppResiliencyResource method. + /// Otherwise you can get one from its parent resource using the GetAppResiliency method. + /// + public partial class AppResiliencyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The appName. + /// The name. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string appName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _appResiliencyClientDiagnostics; + private readonly AppResiliencyRestOperations _appResiliencyRestClient; + private readonly AppResiliencyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/containerApps/resiliencyPolicies"; + + /// Initializes a new instance of the class for mocking. + protected AppResiliencyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AppResiliencyResource(ArmClient client, AppResiliencyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AppResiliencyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _appResiliencyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string appResiliencyApiVersion); + _appResiliencyRestClient = new AppResiliencyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, appResiliencyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AppResiliencyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyResource.Get"); + scope.Start(); + try + { + var response = await _appResiliencyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyResource.Get"); + scope.Start(); + try + { + var response = _appResiliencyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyResource.Delete"); + scope.Start(); + try + { + var response = await _appResiliencyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _appResiliencyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyResource.Delete"); + scope.Start(); + try + { + var response = _appResiliencyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _appResiliencyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Update + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resiliency policy to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyResource.Update"); + scope.Start(); + try + { + var response = await _appResiliencyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Update + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resiliency policy to update. + /// The cancellation token to use. + /// is null. + public virtual Response Update(AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _appResiliencyClientDiagnostics.CreateScope("AppResiliencyResource.Update"); + scope.Start(); + try + { + var response = _appResiliencyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + return Response.FromValue(new AppResiliencyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ArmAppContainersModelFactory.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ArmAppContainersModelFactory.cs index 89f7e57d03c2..7807b2580f0c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ArmAppContainersModelFactory.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ArmAppContainersModelFactory.cs @@ -18,6 +18,34 @@ namespace Azure.ResourceManager.AppContainers.Models /// Model factory for models. public static partial class ArmAppContainersModelFactory { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Policy to set request timeouts. + /// Policy that defines http request retry conditions. + /// Policy that defines tcp request retry conditions. + /// Policy that defines circuit breaker conditions. + /// Defines parameters for http connection pooling. + /// Defines parameters for tcp connection pooling. + /// A new instance for mocking. + public static AppResiliencyData AppResiliencyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TimeoutPolicy timeoutPolicy = null, HttpRetryPolicy httpRetryPolicy = null, int? tcpRetryMaxConnectAttempts = null, CircuitBreakerPolicy circuitBreakerPolicy = null, HttpConnectionPool httpConnectionPool = null, int? maxConnections = null) + { + return new AppResiliencyData( + id, + name, + resourceType, + systemData, + timeoutPolicy, + httpRetryPolicy, + tcpRetryMaxConnectAttempts != null ? new TcpRetryPolicy(tcpRetryMaxConnectAttempts, serializedAdditionalRawData: null) : null, + circuitBreakerPolicy, + httpConnectionPool, + maxConnections != null ? new TcpConnectionPool(maxConnections, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -86,6 +114,86 @@ public static ContainerAppBillingMeter ContainerAppBillingMeter(ResourceIdentifi serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Used to categorize billing meters. + /// Billing meter type. + /// The everyday name of the billing meter. + /// A new instance for mocking. + public static ContainerAppBillingMeterProperties ContainerAppBillingMeterProperties(string workloadProfileCategory = null, string meterType = null, string displayName = null) + { + return new ContainerAppBillingMeterProperties(workloadProfileCategory, meterType, displayName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The managed service identities assigned to this resource. + /// Provisioning state of a builder resource. + /// Resource ID of the container apps environment that the builder is associated with. + /// List of mappings of container registries and the managed identity used to connect to it. + /// A new instance for mocking. + public static BuilderResourceData BuilderResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, BuilderProvisioningState? provisioningState = null, ResourceIdentifier environmentId = null, IEnumerable containerRegistries = null) + { + tags ??= new Dictionary(); + containerRegistries ??= new List(); + + return new BuilderResourceData( + id, + name, + resourceType, + systemData, + tags, + location, + identity, + provisioningState, + environmentId, + containerRegistries?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Build provisioning state. + /// Status of the build once it has been provisioned. + /// Container registry that the final image will be uploaded to. + /// Configuration of the build. + /// Endpoint to which the source code should be uploaded. + /// Endpoint from which the build logs can be streamed. + /// Endpoint to use to retrieve an authentication token for log streaming and uploading source code. + /// A new instance for mocking. + public static BuildResourceData BuildResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, BuildProvisioningState? provisioningState = null, BuildStatus? buildStatus = null, ContainerRegistryWithCustomImage destinationContainerRegistry = null, BuildConfiguration configuration = null, string uploadEndpoint = null, string logStreamEndpoint = null, string tokenEndpoint = null) + { + return new BuildResourceData( + id, + name, + resourceType, + systemData, + provisioningState, + buildStatus, + destinationContainerRegistry, + configuration, + uploadEndpoint, + logStreamEndpoint, + tokenEndpoint, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Authentication token. + /// Token expiration date. + /// A new instance for mocking. + public static BuildToken BuildToken(string token = null, DateTimeOffset? expires = null) + { + return new BuildToken(token, expires, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -194,8 +302,9 @@ public static ContainerAppCertificateData ContainerAppCertificateData(ResourceId /// Certificate thumbprint. /// Is the certificate valid?. /// Public key hash. + /// The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA`. /// A new instance for mocking. - public static ContainerAppCertificateProperties ContainerAppCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState = null, string deploymentErrors = null, ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties = null, string password = null, string subjectName = null, IEnumerable subjectAlternativeNames = null, byte[] value = null, string issuer = null, DateTimeOffset? issueOn = null, DateTimeOffset? expireOn = null, string thumbprint = null, bool? isValid = null, string publicKeyHash = null) + public static ContainerAppCertificateProperties ContainerAppCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState = null, string deploymentErrors = null, ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties = null, string password = null, string subjectName = null, IEnumerable subjectAlternativeNames = null, byte[] value = null, string issuer = null, DateTimeOffset? issueOn = null, DateTimeOffset? expireOn = null, string thumbprint = null, bool? isValid = null, string publicKeyHash = null, CertificateType? certificateType = null) { subjectAlternativeNames ??= new List(); @@ -213,10 +322,11 @@ public static ContainerAppCertificateProperties ContainerAppCertificatePropertie thumbprint, isValid, publicKeyHash, + certificateType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -229,16 +339,18 @@ public static ContainerAppCertificateProperties ContainerAppCertificatePropertie /// Name of a Dapr component to retrieve component secrets from. /// Component metadata. /// Names of container apps that can use this Dapr component. - /// Provisioning state of the Dapr Component. + /// List of container app services that are bound to the Dapr component. + /// Provisioning state of the Connected Environment Dapr Component. /// Any errors that occurred during deployment or deployment validation. - /// A new instance for mocking. - public static ContainerAppDaprComponentData ContainerAppDaprComponentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = null, string initTimeout = null, IEnumerable secrets = null, string secretStoreComponent = null, IEnumerable metadata = null, IEnumerable scopes = null, DaprComponentProvisioningState? provisioningState = null, string deploymentErrors = null) + /// A new instance for mocking. + public static ConnectedEnvironmentDaprComponentData ConnectedEnvironmentDaprComponentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = null, string initTimeout = null, IEnumerable secrets = null, string secretStoreComponent = null, IEnumerable metadata = null, IEnumerable scopes = null, IEnumerable serviceComponentBind = null, ConnectedEnvironmentDaprComponentProvisioningState? provisioningState = null, string deploymentErrors = null) { secrets ??= new List(); metadata ??= new List(); scopes ??= new List(); + serviceComponentBind ??= new List(); - return new ContainerAppDaprComponentData( + return new ConnectedEnvironmentDaprComponentData( id, name, resourceType, @@ -251,6 +363,7 @@ public static ContainerAppDaprComponentData ContainerAppDaprComponentData(Resour secretStoreComponent, metadata?.ToList(), scopes?.ToList(), + serviceComponentBind?.ToList(), provisioningState, deploymentErrors, serializedAdditionalRawData: null); @@ -284,13 +397,14 @@ public static ContainerAppConnectedEnvironmentStorageData ContainerAppConnectedE } /// Initializes a new instance of . - /// Azure file properties. /// Provisioning state of the storage. /// Any errors that occurred during deployment or deployment validation. + /// Azure file properties. + /// SMB storage properties. /// A new instance for mocking. - public static ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(ContainerAppAzureFileProperties azureFile = null, ConnectedEnvironmentStorageProvisioningState? provisioningState = null, string deploymentErrors = null) + public static ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(ConnectedEnvironmentStorageProvisioningState? provisioningState = null, string deploymentErrors = null, ContainerAppAzureFileProperties azureFile = null, SmbStorage smb = null) { - return new ConnectedEnvironmentStorageProperties(azureFile, provisioningState, deploymentErrors, serializedAdditionalRawData: null); + return new ConnectedEnvironmentStorageProperties(provisioningState, deploymentErrors, azureFile, smb, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -303,12 +417,14 @@ public static ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageP /// The complex type of the extended location. /// managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. - /// Metadata to represent the container app kind, representing if a container app is workflowapp or functionapp. + /// Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. /// Provisioning state of the Container App. /// Running status of the Container App. + /// Any errors that occurred during deployment. /// Deprecated. Resource ID of the Container App's environment. /// Resource ID of environment. /// Workload profile name to pin for container app execution. + /// Container App auto patch configuration. /// Name of the latest revision of the Container App. /// Name of the latest ready revision of the Container App. /// Fully Qualified Domain Name of the latest revision of the Container App. @@ -318,7 +434,7 @@ public static ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageP /// Outbound IP Addresses for container app. /// The endpoint of the eventstream of the container app. /// A new instance for mocking. - public static ContainerAppData ContainerAppData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerAppExtendedLocation extendedLocation = null, ManagedServiceIdentity identity = null, string managedBy = null, ContainerAppKind? kind = null, ContainerAppProvisioningState? provisioningState = null, ContainerAppRunningStatus? runningStatus = null, ResourceIdentifier managedEnvironmentId = null, ResourceIdentifier environmentId = null, string workloadProfileName = null, string latestRevisionName = null, string latestReadyRevisionName = null, string latestRevisionFqdn = null, string customDomainVerificationId = null, ContainerAppConfiguration configuration = null, ContainerAppTemplate template = null, IEnumerable outboundIPAddressList = null, Uri eventStreamEndpoint = null) + public static ContainerAppData ContainerAppData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerAppExtendedLocation extendedLocation = null, ManagedServiceIdentity identity = null, string managedBy = null, ContainerAppKind? kind = null, ContainerAppProvisioningState? provisioningState = null, ContainerAppRunningStatus? runningStatus = null, string deploymentErrors = null, ResourceIdentifier managedEnvironmentId = null, ResourceIdentifier environmentId = null, string workloadProfileName = null, PatchingMode? patchingMode = null, string latestRevisionName = null, string latestReadyRevisionName = null, string latestRevisionFqdn = null, string customDomainVerificationId = null, ContainerAppConfiguration configuration = null, ContainerAppTemplate template = null, IEnumerable outboundIPAddressList = null, Uri eventStreamEndpoint = null) { tags ??= new Dictionary(); outboundIPAddressList ??= new List(); @@ -336,9 +452,11 @@ public static ContainerAppData ContainerAppData(ResourceIdentifier id = null, st kind, provisioningState, runningStatus, + deploymentErrors, managedEnvironmentId, environmentId, workloadProfileName, + patchingMode != null ? new ContainerAppPropertiesPatchingConfiguration(patchingMode, serializedAdditionalRawData: null) : null, latestRevisionName, latestReadyRevisionName, latestRevisionFqdn, @@ -364,8 +482,9 @@ public static ContainerAppData ContainerAppData(ResourceIdentifier id = null, st /// Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. /// CORS policy for container app. /// Settings to expose additional ports on container app. + /// Whether an http app listens on http or https. /// A new instance for mocking. - public static ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn = null, bool? external = null, int? targetPort = null, int? exposedPort = null, ContainerAppIngressTransportMethod? transport = null, IEnumerable traffic = null, IEnumerable customDomains = null, bool? allowInsecure = null, IEnumerable ipSecurityRestrictions = null, Affinity? stickySessionsAffinity = null, ContainerAppIngressClientCertificateMode? clientCertificateMode = null, ContainerAppCorsPolicy corsPolicy = null, IEnumerable additionalPortMappings = null) + public static ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn = null, bool? external = null, int? targetPort = null, int? exposedPort = null, ContainerAppIngressTransportMethod? transport = null, IEnumerable traffic = null, IEnumerable customDomains = null, bool? allowInsecure = null, IEnumerable ipSecurityRestrictions = null, Affinity? stickySessionsAffinity = null, ContainerAppIngressClientCertificateMode? clientCertificateMode = null, ContainerAppCorsPolicy corsPolicy = null, IEnumerable additionalPortMappings = null, IngressTargetPortHttpScheme? targetPortHttpScheme = null) { traffic ??= new List(); customDomains ??= new List(); @@ -386,6 +505,7 @@ public static ContainerAppIngressConfiguration ContainerAppIngressConfiguration( clientCertificateMode, corsPolicy, additionalPortMappings?.ToList(), + targetPortHttpScheme, serializedAdditionalRawData: null); } @@ -393,10 +513,11 @@ public static ContainerAppIngressConfiguration ContainerAppIngressConfiguration( /// Required CPU in cores, e.g. 0.5. /// Required memory, e.g. "250Mb". /// Ephemeral Storage, e.g. "1Gi". + /// Required GPU in cores for GPU based app, e.g. 1.0. /// A new instance for mocking. - public static AppContainerResources AppContainerResources(double? cpu = null, string memory = null, string ephemeralStorage = null) + public static AppContainerResources AppContainerResources(double? cpu = null, string memory = null, string ephemeralStorage = null, double? gpu = null) { - return new AppContainerResources(cpu, memory, ephemeralStorage, serializedAdditionalRawData: null); + return new AppContainerResources(cpu, memory, ephemeralStorage, gpu, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -497,6 +618,170 @@ public static ContainerAppAuthToken ContainerAppAuthToken(ResourceIdentifier id serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Build provisioning state. + /// Status of the build once it has been provisioned. + /// Container registry that the final image will be uploaded to. + /// Configuration of the build. + /// Endpoint from which the build logs can be streamed. + /// A new instance for mocking. + public static ContainerAppsBuildResourceData ContainerAppsBuildResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, BuildProvisioningState? provisioningState = null, BuildStatus? buildStatus = null, ContainerRegistryWithCustomImage destinationContainerRegistry = null, ContainerAppsBuildConfiguration configuration = null, string logStreamEndpoint = null) + { + return new ContainerAppsBuildResourceData( + id, + name, + resourceType, + systemData, + provisioningState, + buildStatus, + destinationContainerRegistry, + configuration, + logStreamEndpoint, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Base OS used to build and run the app. + /// Platform to be used to build and run the app. + /// Platform version to be used to build and run the app. + /// List of environment variables to be passed to the build, secrets should not be used in environment variable. + /// List of steps to perform before the build. + /// A new instance for mocking. + public static ContainerAppsBuildConfiguration ContainerAppsBuildConfiguration(string baseOS = null, string platform = null, string platformVersion = null, IEnumerable environmentVariables = null, IEnumerable preBuildSteps = null) + { + environmentVariables ??= new List(); + preBuildSteps ??= new List(); + + return new ContainerAppsBuildConfiguration( + baseOS, + platform, + platformVersion, + environmentVariables?.ToList(), + preBuildSteps?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Container App Label History resource specific properties. + /// A new instance for mocking. + public static LabelHistoryData LabelHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable labelHistoryRecords = null) + { + labelHistoryRecords ??= new List(); + + return new LabelHistoryData( + id, + name, + resourceType, + systemData, + labelHistoryRecords != null ? new LabelHistoryProperties(labelHistoryRecords?.ToList(), serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Container App revision name that label was applied to. + /// Timestamp describing when the label was applied to the revision. + /// Timestamp describing when the label was removed from the revision. Only meaningful when the label is currently applied to the revision. + /// Status of the label history record. + /// A new instance for mocking. + public static LabelHistoryRecordItem LabelHistoryRecordItem(string revision = null, DateTimeOffset? start = null, DateTimeOffset? stop = null, Status? status = null) + { + return new LabelHistoryRecordItem(revision, start, stop, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties that describes current states of the patch resource. + /// A new instance for mocking. + public static ContainerAppsPatchResourceData ContainerAppsPatchResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PatchProperties properties = null) + { + return new ContainerAppsPatchResourceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Azure resource id of the target environment for the patch. + /// The Azure resource id of the target container app for the patch. + /// The Azure resource id of the target revision for the patch. + /// The status of the patch operation. + /// The UTC timestamp that describes when the patch object was created. + /// The UTC timestamp that describes when the patch object was last updated. + /// Detailed info describes the patch operation for the target container app. + /// A new instance for mocking. + public static PatchProperties PatchProperties(ResourceIdentifier targetEnvironmentId = null, ResourceIdentifier targetContainerAppId = null, ResourceIdentifier targetRevisionId = null, PatchApplyStatus? patchApplyStatus = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, IEnumerable patchDetails = null) + { + patchDetails ??= new List(); + + return new PatchProperties( + targetEnvironmentId, + targetContainerAppId, + targetRevisionId, + patchApplyStatus, + createdOn, + lastModifiedOn, + patchDetails?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the target container for the patch. + /// The name of the target image for the patch. + /// The UTC timestamp that describes the latest detection was done. + /// The status of the patch detection. + /// The name of the new image created by the patch. + /// New layer update details in the target image. + /// The old layer details in the target image. + /// The type for the patch. + /// A new instance for mocking. + public static PatchDetails PatchDetails(string targetContainerName = null, string targetImage = null, DateTimeOffset lastDetectionOn = default, DetectionStatus detectionStatus = default, string newImageName = null, PatchDetailsNewLayer newLayer = null, PatchDetailsOldLayer oldLayer = null, PatchType? patchType = null) + { + return new PatchDetails( + targetContainerName, + targetImage, + lastDetectionOn, + detectionStatus, + newImageName, + newLayer, + oldLayer, + patchType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The details of the new layer for the target image. + /// The framework and its version in the new run image for the target image. + /// The OS name and its version in the new run image for the target image. + /// A new instance for mocking. + public static PatchDetailsNewLayer PatchDetailsNewLayer(string name = null, string frameworkAndVersion = null, string osAndVersion = null) + { + return new PatchDetailsNewLayer(name, frameworkAndVersion, osAndVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The details of the old layer for the target image. + /// The framework and its version in the old run image for the target image. + /// The OS name and its version in the old run image for the target image. + /// A new instance for mocking. + public static PatchDetailsOldLayer PatchDetailsOldLayer(string name = null, string frameworkAndVersion = null, string osAndVersion = null) + { + return new PatchDetailsOldLayer(name, frameworkAndVersion, osAndVersion, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -516,13 +801,16 @@ public static ContainerAppAuthToken ContainerAppAuthToken(ResourceIdentifier id /// Boolean describing if the Revision is Active. /// Number of pods currently running for this revision. /// Traffic weight assigned to this revision. + /// List of labels assigned to this revision. /// Optional Field - Platform Error Message. /// Current health State of the revision. /// Current provisioning State of the revision. /// Current running state of the revision. /// A new instance for mocking. - public static ContainerAppRevisionData ContainerAppRevisionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastActiveOn = null, string fqdn = null, ContainerAppTemplate template = null, bool? isActive = null, int? replicas = null, int? trafficWeight = null, string provisioningError = null, ContainerAppRevisionHealthState? healthState = null, ContainerAppRevisionProvisioningState? provisioningState = null, RevisionRunningState? runningState = null) + public static ContainerAppRevisionData ContainerAppRevisionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastActiveOn = null, string fqdn = null, ContainerAppTemplate template = null, bool? isActive = null, int? replicas = null, int? trafficWeight = null, IEnumerable labels = null, string provisioningError = null, ContainerAppRevisionHealthState? healthState = null, ContainerAppRevisionProvisioningState? provisioningState = null, RevisionRunningState? runningState = null) { + labels ??= new List(); + return new ContainerAppRevisionData( id, name, @@ -535,6 +823,7 @@ public static ContainerAppRevisionData ContainerAppRevisionData(ResourceIdentifi isActive, replicas, trafficWeight, + labels?.ToList(), provisioningError, healthState, provisioningState, @@ -581,8 +870,9 @@ public static ContainerAppReplicaData ContainerAppReplicaData(ResourceIdentifier /// The details of container current running state. /// Log Stream endpoint. /// Container exec endpoint. + /// Container debug endpoint. /// A new instance for mocking. - public static ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = null, bool? isStarted = null, int? restartCount = null, ContainerAppContainerRunningState? runningState = null, string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null) + public static ContainerAppReplicaContainer ContainerAppReplicaContainer(string name = null, string containerId = null, bool? isReady = null, bool? isStarted = null, int? restartCount = null, ContainerAppContainerRunningState? runningState = null, string runningStateDetails = null, string logStreamEndpoint = null, string execEndpoint = null, string debugEndpoint = null) { return new ContainerAppReplicaContainer( name, @@ -594,6 +884,7 @@ public static ContainerAppReplicaContainer ContainerAppReplicaContainer(string n runningStateDetails, logStreamEndpoint, execEndpoint, + debugEndpoint, serializedAdditionalRawData: null); } @@ -670,9 +961,13 @@ public static ContainerAppDiagnosticSupportTopic ContainerAppDiagnosticSupportTo /// Vnet configuration for the environment. /// Any errors that occurred during deployment or deployment validation. /// Default Domain Name for the cluster. + /// Private Link Default Domain Name for the environment. /// Static IP of the Environment. /// Cluster configuration which enables the log daemon to export app logs to configured destination. + /// Environment level Application Insights configuration. + /// Environment Open Telemetry configuration. /// Whether or not this Managed Environment is zone-redundant. + /// The list of availability zones to use for managed environment. /// Custom domain configuration for the environment. /// The endpoint of the eventstream of the Environment. /// Workload profiles configured for the Managed Environment. @@ -680,14 +975,16 @@ public static ContainerAppDiagnosticSupportTopic ContainerAppDiagnosticSupportTo /// The configuration of Dapr component. /// Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. /// Peer authentication settings for the Managed Environment. - /// Peer traffic settings for the Managed Environment. + /// Peer traffic settings for the Managed Environment. /// Ingress configuration for the Managed Environment. /// Private endpoint connections to the resource. /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. + /// Disk encryption configuration for the Managed Environment. /// A new instance for mocking. - public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string kind = null, ManagedServiceIdentity identity = null, ContainerAppEnvironmentProvisioningState? provisioningState = null, string daprAIInstrumentationKey = null, string daprAIConnectionString = null, ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, IPAddress staticIP = null, ContainerAppLogsConfiguration appLogsConfiguration = null, bool? isZoneRedundant = null, ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = null, bool? isEnabled = null, ManagedEnvironmentIngressConfiguration ingressConfiguration = null, IEnumerable privateEndpointConnections = null, ContainerAppPublicNetworkAccess? publicNetworkAccess = null) + public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string kind = null, ManagedServiceIdentity identity = null, ContainerAppEnvironmentProvisioningState? provisioningState = null, string daprAIInstrumentationKey = null, string daprAIConnectionString = null, ContainerAppVnetConfiguration vnetConfiguration = null, string deploymentErrors = null, string defaultDomain = null, string privateLinkDefaultDomain = null, IPAddress staticIP = null, ContainerAppLogsConfiguration appLogsConfiguration = null, string appInsightsConnectionString = null, OpenTelemetryConfiguration openTelemetryConfiguration = null, bool? isZoneRedundant = null, IEnumerable availabilityZones = null, ContainerAppCustomDomainConfiguration customDomainConfiguration = null, string eventStreamEndpoint = null, IEnumerable workloadProfiles = null, string kedaVersion = null, string daprVersion = null, string infrastructureResourceGroup = null, bool? isMtlsEnabled = null, bool? isPeerToPeerEncryptionEnabled = null, ManagedEnvironmentIngressConfiguration ingressConfiguration = null, IEnumerable privateEndpointConnections = null, ContainerAppPublicNetworkAccess? publicNetworkAccess = null, DiskEncryptionConfigurationKeyVaultConfiguration diskEncryptionKeyVaultConfiguration = null) { tags ??= new Dictionary(); + availabilityZones ??= new List(); workloadProfiles ??= new List(); privateEndpointConnections ??= new List(); @@ -706,9 +1003,13 @@ public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentD vnetConfiguration, deploymentErrors, defaultDomain, + privateLinkDefaultDomain, staticIP, appLogsConfiguration, + appInsightsConnectionString != null ? new AppInsightsConfiguration(appInsightsConnectionString, serializedAdditionalRawData: null) : null, + openTelemetryConfiguration, isZoneRedundant, + availabilityZones?.ToList(), customDomainConfiguration, eventStreamEndpoint, workloadProfiles?.ToList(), @@ -716,10 +1017,11 @@ public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentD daprVersion != null ? new DaprConfiguration(daprVersion, serializedAdditionalRawData: null) : null, infrastructureResourceGroup, isMtlsEnabled != null ? new ManagedEnvironmentPropertiesPeerAuthentication(new Mtls(isMtlsEnabled, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, - isEnabled != null ? new ManagedEnvironmentPropertiesPeerTrafficConfiguration(new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(isEnabled, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, + isPeerToPeerEncryptionEnabled != null ? new ManagedEnvironmentPropertiesPeerTrafficConfiguration(new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(isPeerToPeerEncryptionEnabled, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, ingressConfiguration, privateEndpointConnections?.ToList(), publicNetworkAccess, + diskEncryptionKeyVaultConfiguration != null ? new DiskEncryptionConfiguration(diskEncryptionKeyVaultConfiguration, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } @@ -756,8 +1058,10 @@ public static ContainerAppPrivateEndpointConnectionData ContainerAppPrivateEndpo /// The systemData. /// The tags. /// The location. + /// The complex type of the extended location. /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. /// Provisioning state of the Container Apps Job. + /// Current running state of the job. /// Resource ID of environment. /// Workload profile name to pin for container apps job execution. /// Container Apps Job configuration properties. @@ -765,7 +1069,7 @@ public static ContainerAppPrivateEndpointConnectionData ContainerAppPrivateEndpo /// Outbound IP Addresses of a container apps job. /// The endpoint of the eventstream of the container apps job. /// A new instance for mocking. - public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ContainerAppJobProvisioningState? provisioningState = null, string environmentId = null, string workloadProfileName = null, ContainerAppJobConfiguration configuration = null, ContainerAppJobTemplate template = null, IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) + public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerAppExtendedLocation extendedLocation = null, ManagedServiceIdentity identity = null, ContainerAppJobProvisioningState? provisioningState = null, JobRunningState? runningState = null, string environmentId = null, string workloadProfileName = null, ContainerAppJobConfiguration configuration = null, ContainerAppJobTemplate template = null, IEnumerable outboundIPAddresses = null, string eventStreamEndpoint = null) { tags ??= new Dictionary(); outboundIPAddresses ??= new List(); @@ -777,8 +1081,10 @@ public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id = nu systemData, tags, location, + extendedLocation, identity, provisioningState, + runningState, environmentId, workloadProfileName, configuration, @@ -788,6 +1094,33 @@ public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id = nu serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Type of the .NET Component. + /// Provisioning state of the .NET Component. + /// List of .NET Components configuration properties. + /// List of .NET Components that are bound to the .NET component. + /// A new instance for mocking. + public static DotNetComponentData DotNetComponentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DotNetComponentType? componentType = null, DotNetComponentProvisioningState? provisioningState = null, IEnumerable configurations = null, IEnumerable serviceBinds = null) + { + configurations ??= new List(); + serviceBinds ??= new List(); + + return new DotNetComponentData( + id, + name, + resourceType, + systemData, + componentType, + provisioningState, + configurations?.ToList(), + serviceBinds?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -796,7 +1129,7 @@ public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id = nu /// /// Java Component resource specific properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , , and . /// /// A new instance for mocking. public static JavaComponentData JavaComponentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, JavaComponentProperties properties = null) @@ -860,9 +1193,14 @@ public static ContainerAppJobExecutions ContainerAppJobExecutions(IEnumerable Job execution start time. /// Job execution end time. /// Job's execution container. + /// Detailed status of the job execution. + /// Reason for the current condition of job execution. + /// Human readable message indicating details about the current condition of the job execution. /// A new instance for mocking. - public static ContainerAppJobExecutionData ContainerAppJobExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, JobExecutionRunningState? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ContainerAppJobExecutionTemplate template = null) + public static ContainerAppJobExecutionData ContainerAppJobExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, JobExecutionRunningState? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, ContainerAppJobExecutionTemplate template = null, IEnumerable detailedStatusReplicas = null, string reason = null, string message = null) { + detailedStatusReplicas ??= new List(); + return new ContainerAppJobExecutionData( id, name, @@ -872,9 +1210,93 @@ public static ContainerAppJobExecutionData ContainerAppJobExecutionData(Resource startOn, endOn, template, + detailedStatusReplicas != null ? new ExecutionStatus(detailedStatusReplicas?.ToList(), serializedAdditionalRawData: null) : null, + reason, + message, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Replica Name. + /// Containers in the execution replica. + /// A new instance for mocking. + public static ReplicaExecutionStatus ReplicaExecutionStatus(string name = null, IEnumerable containers = null) + { + containers ??= new List(); + + return new ReplicaExecutionStatus(name, containers?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Container Name. + /// Exit code. + /// Additional information for the container status. + /// Status of the container. + /// A new instance for mocking. + public static ContainerExecutionStatus ContainerExecutionStatus(string name = null, int? code = null, string additionalInformation = null, string status = null) + { + return new ContainerExecutionStatus(name, code, additionalInformation, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static LogicAppData LogicAppData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, BinaryData properties = null) + { + return new LogicAppData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource kind. + /// The resource location. + /// Additional workflow properties. + /// A new instance for mocking. + public static LogicAppWorkflowEnvelopeData LogicAppWorkflowEnvelopeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null, LogicAppWorkflowEnvelopeProperties properties = null) + { + return new LogicAppWorkflowEnvelopeData( + id, + name, + resourceType, + systemData, + kind, + location, + properties, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Gets or sets the files. + /// Gets or sets the state of the workflow. + /// Gets or sets workflow health. + /// A new instance for mocking. + public static LogicAppWorkflowEnvelopeProperties LogicAppWorkflowEnvelopeProperties(BinaryData files = null, LogicAppWorkflowState? flowState = null, LogicAppWorkflowHealth health = null) + { + return new LogicAppWorkflowEnvelopeProperties(files, flowState, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the workflow health state. + /// Gets or sets the workflow error. + /// A new instance for mocking. + public static LogicAppWorkflowHealth LogicAppWorkflowHealth(LogicAppWorkflowHealthState state = default, ResponseError error = null) + { + return new LogicAppWorkflowHealth(state, error, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -986,6 +1408,98 @@ public static ContainerAppPrivateLink ContainerAppPrivateLink(ResourceIdentifier serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The optional inbound component resiliency policy configuration. + /// The optional outbound component resiliency policy configuration. + /// A new instance for mocking. + public static DaprComponentResiliencyPolicyData DaprComponentResiliencyPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DaprComponentResiliencyPolicyConfiguration inboundPolicy = null, DaprComponentResiliencyPolicyConfiguration outboundPolicy = null) + { + return new DaprComponentResiliencyPolicyData( + id, + name, + resourceType, + systemData, + inboundPolicy, + outboundPolicy, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Component type. + /// Component version. + /// Boolean describing if the component errors are ignores. + /// Initialization timeout. + /// Collection of secrets used by a Dapr component. + /// Name of a Dapr component to retrieve component secrets from. + /// Component metadata. + /// Names of container apps that can use this Dapr component. + /// List of container app services that are bound to the Dapr component. + /// A new instance for mocking. + public static ContainerAppDaprComponentData ContainerAppDaprComponentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string componentType = null, string version = null, bool? ignoreErrors = null, string initTimeout = null, IEnumerable secrets = null, string secretStoreComponent = null, IEnumerable metadata = null, IEnumerable scopes = null, IEnumerable serviceComponentBind = null) + { + secrets ??= new List(); + metadata ??= new List(); + scopes ??= new List(); + serviceComponentBind ??= new List(); + + return new ContainerAppDaprComponentData( + id, + name, + resourceType, + systemData, + componentType, + version, + ignoreErrors, + initTimeout, + secrets?.ToList(), + secretStoreComponent, + metadata?.ToList(), + scopes?.ToList(), + serviceComponentBind?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Dapr PubSub component name. + /// Topic name. + /// Deadletter topic name. + /// Subscription routes. + /// Application scopes to restrict the subscription to specific apps. + /// Subscription metadata. + /// Bulk subscription options. + /// A new instance for mocking. + public static DaprSubscriptionData DaprSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string pubsubName = null, string topic = null, string deadLetterTopic = null, DaprSubscriptionRoutes routes = null, IEnumerable scopes = null, IDictionary metadata = null, DaprSubscriptionBulkSubscribeConfig bulkSubscribe = null) + { + scopes ??= new List(); + metadata ??= new Dictionary(); + + return new DaprSubscriptionData( + id, + name, + resourceType, + systemData, + pubsubName, + topic, + deadLetterTopic, + routes, + scopes?.ToList(), + metadata, + bulkSubscribe, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1005,11 +1519,11 @@ public static ContainerAppHttpRouteConfigData ContainerAppHttpRouteConfigData(Re } /// Initializes a new instance of . - /// The provisioning state of the Http Route Config. + /// The provisioning state of the Http Route Config in cluster. /// List of errors when trying to reconcile http routes. /// FQDN of the route resource. - /// Custom domain bindings for Http Routes' hostnames. - /// Routing Rules for the Http Route resource. + /// Custom domain bindings for http Routes' hostnames. + /// Routing Rules for http route resource. /// A new instance for mocking. public static ContainerAppHttpRouteConfigProperties ContainerAppHttpRouteConfigProperties(ContainerAppHttpRouteProvisioningState? provisioningState = null, IEnumerable provisioningErrors = null, string fqdn = null, IEnumerable customDomains = null, IEnumerable rules = null) { @@ -1090,11 +1604,13 @@ public static ContainerAppManagedEnvironmentStorageData ContainerAppManagedEnvir /// The pool configuration if the poolManagementType is dynamic. /// The custom container configuration if the containerType is CustomContainer. /// The network configuration of the sessions in the session pool. + /// The template status of the session pool, showing active template, or desired template during session pool update. This is only available if the containerType is CustomContainer. /// The endpoint to manage the pool. /// Provisioning state of the session pool. /// Optional settings for a Managed Identity that is assigned to the Session pool. + /// The MCP server settings of the session pool. /// A new instance for mocking. - public static SessionPoolData SessionPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ResourceIdentifier environmentId = null, ContainerType? containerType = null, PoolManagementType? poolManagementType = null, int? nodeCount = null, SessionPoolScaleConfiguration scaleConfiguration = null, IEnumerable secrets = null, SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration = null, CustomContainerTemplate customContainerTemplate = null, SessionNetworkStatus? sessionNetworkStatus = null, Uri poolManagementEndpoint = null, SessionPoolProvisioningState? provisioningState = null, IEnumerable managedIdentitySettings = null) + public static SessionPoolData SessionPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ResourceIdentifier environmentId = null, ContainerType? containerType = null, PoolManagementType? poolManagementType = null, int? nodeCount = null, SessionPoolScaleConfiguration scaleConfiguration = null, IEnumerable secrets = null, SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration = null, CustomContainerTemplate customContainerTemplate = null, SessionNetworkStatus? sessionNetworkStatus = null, TemplateUpdateStatus templateUpdateStatus = null, Uri poolManagementEndpoint = null, SessionPoolProvisioningState? provisioningState = null, IEnumerable managedIdentitySettings = null, McpServerSettings mcpServerSettings = null) { tags ??= new Dictionary(); secrets ??= new List(); @@ -1117,16 +1633,85 @@ public static SessionPoolData SessionPoolData(ResourceIdentifier id = null, stri dynamicPoolLifecycleConfiguration != null ? new DynamicPoolConfiguration(dynamicPoolLifecycleConfiguration, serializedAdditionalRawData: null) : null, customContainerTemplate, sessionNetworkStatus != null ? new SessionNetworkConfiguration(sessionNetworkStatus, serializedAdditionalRawData: null) : null, + templateUpdateStatus, poolManagementEndpoint, provisioningState, managedIdentitySettings?.ToList(), + mcpServerSettings, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. + /// Initializes a new instance of . + /// The status of the current active template. + /// The status of the desired template during session pool update. + /// A new instance for mocking. + public static TemplateUpdateStatus TemplateUpdateStatus(TemplateStatus activeTemplate = null, TemplateStatus desiredTemplate = null) + { + return new TemplateUpdateStatus(activeTemplate, desiredTemplate, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The detailed status of this template. + /// The creation time of this template. + /// The status of this template. + /// List of container definitions for the sessions of this template. + /// Session pool ingress configuration of this template. + /// A new instance for mocking. + public static TemplateStatus TemplateStatus(string details = null, DateTimeOffset? createdOn = null, TemplatePoolStatus status = null, IEnumerable containers = null, int? ingressTargetPort = null) + { + containers ??= new List(); + + return new TemplateStatus( + details, + createdOn, + status, + containers?.ToList(), + ingressTargetPort != null ? new SessionIngress(ingressTargetPort, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The expected count of pods in this pool. + /// The ready count of pods in this pool. + /// The pending count of pods in this pool. + /// The image pull fail count of pods in this pool. + /// The crash count of pods in this pool. + /// The allocated count of pods in this pool. + /// A new instance for mocking. + public static TemplatePoolStatus TemplatePoolStatus(int? expectedCount = null, int? readyCount = null, int? pendingCount = null, int? imagePullFailCount = null, int? crashCount = null, int? allocatedCount = null) + { + return new TemplatePoolStatus( + expectedCount, + readyCount, + pendingCount, + imagePullFailCount, + crashCount, + allocatedCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Indicates whether the MCP server is enabled. + /// Indicates whether the MCP server API key is disabled. + /// The endpoint of the MCP server. + /// A new instance for mocking. + public static McpServerSettings McpServerSettings(bool? isMcpServerEnabled = null, bool? isMcpServerApiKeyDisabled = null, string mcpServerEndpoint = null) + { + return new McpServerSettings(isMcpServerEnabled, isMcpServerApiKeyDisabled, mcpServerEndpoint, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The API key for the MCP server. + /// A new instance for mocking. + public static McpServerCredential McpServerCredential(string apiKey = null) + { + return new McpServerCredential(apiKey, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. /// The systemData. /// Current provisioning State of the operation. /// The repo url which will be integrated to ContainerApp. @@ -1171,35 +1756,29 @@ public static ContainerAppUsageName ContainerAppUsageName(string value = null, s return new ContainerAppUsageName(value, localizedValue, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// A new instance for mocking. - public static LogicAppData LogicAppData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null) + /// Initializes a new instance of . + /// Provisioning state of the Java Component. + /// List of Java Components configuration properties. + /// Java component scaling configurations. + /// List of Java Components that are bound to the Java component. + /// Java Component Ingress configurations. + /// Gateway route definition. + /// A new instance for mocking. + public static SpringCloudGatewayComponent SpringCloudGatewayComponent(JavaComponentProvisioningState? provisioningState = null, IEnumerable configurations = null, JavaComponentPropertiesScale scale = null, IEnumerable serviceBinds = null, string ingressFqdn = null, IEnumerable springCloudGatewayRoutes = null) { - return new LogicAppData(id, name, resourceType, systemData, serializedAdditionalRawData: null); - } + configurations ??= new List(); + serviceBinds ??= new List(); + springCloudGatewayRoutes ??= new List(); - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Gets the logic app hybrid workflow kind. - /// Additional workflow properties. - /// A new instance for mocking. - public static LogicAppWorkflowEnvelopeData LogicAppWorkflowEnvelopeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, LogicAppWorkflowKind? kind = null, LogicAppWorkflowEnvelopeProperties properties = null) - { - return new LogicAppWorkflowEnvelopeData( - id, - name, - resourceType, - systemData, - kind, - properties, - serializedAdditionalRawData: null); + return new SpringCloudGatewayComponent( + JavaComponentType.SpringCloudGateway, + provisioningState, + configurations?.ToList(), + scale, + serviceBinds?.ToList(), + serializedAdditionalRawData: null, + ingressFqdn != null ? new JavaComponentIngress(ingressFqdn, serializedAdditionalRawData: null) : null, + springCloudGatewayRoutes?.ToList()); } /// Initializes a new instance of . @@ -1224,6 +1803,28 @@ public static SpringBootAdminComponent SpringBootAdminComponent(JavaComponentPro ingressFqdn != null ? new JavaComponentIngress(ingressFqdn, serializedAdditionalRawData: null) : null); } + /// Initializes a new instance of . + /// Provisioning state of the Java Component. + /// List of Java Components configuration properties. + /// Java component scaling configurations. + /// List of Java Components that are bound to the Java component. + /// Java Component Ingress configurations. + /// A new instance for mocking. + public static NacosComponent NacosComponent(JavaComponentProvisioningState? provisioningState = null, IEnumerable configurations = null, JavaComponentPropertiesScale scale = null, IEnumerable serviceBinds = null, string ingressFqdn = null) + { + configurations ??= new List(); + serviceBinds ??= new List(); + + return new NacosComponent( + JavaComponentType.Nacos, + provisioningState, + configurations?.ToList(), + scale, + serviceBinds?.ToList(), + serializedAdditionalRawData: null, + ingressFqdn != null ? new JavaComponentIngress(ingressFqdn, serializedAdditionalRawData: null) : null); + } + /// Initializes a new instance of . /// Provisioning state of the Java Component. /// List of Java Components configuration properties. @@ -1266,6 +1867,225 @@ public static SpringCloudConfigComponent SpringCloudConfigComponent(JavaComponen serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Provisioning state of the certificate. + /// Any errors that occurred during deployment or deployment validation. + /// Properties for a certificate stored in a Key Vault. + /// Certificate password. + /// Subject name of the certificate. + /// Subject alternative names the certificate applies to. + /// PFX or PEM blob. + /// Certificate issuer. + /// Certificate issue Date. + /// Certificate expiration date. + /// Certificate thumbprint. + /// Is the certificate valid?. + /// Public key hash. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerAppCertificateProperties ContainerAppCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState, string deploymentErrors, ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, IEnumerable subjectAlternativeNames, byte[] value, string issuer, DateTimeOffset? issueOn, DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) + { + return ContainerAppCertificateProperties(provisioningState: provisioningState, deploymentErrors: deploymentErrors, certificateKeyVaultProperties: certificateKeyVaultProperties, password: password, subjectName: subjectName, subjectAlternativeNames: subjectAlternativeNames, value: value, issuer: issuer, issueOn: issueOn, expireOn: expireOn, thumbprint: thumbprint, isValid: isValid, publicKeyHash: publicKeyHash, certificateType: default); + } + + /// Initializes a new instance of . + /// Azure file properties. + /// Provisioning state of the storage. + /// Any errors that occurred during deployment or deployment validation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ConnectedEnvironmentStorageProperties ConnectedEnvironmentStorageProperties(ContainerAppAzureFileProperties azureFile, ConnectedEnvironmentStorageProvisioningState? provisioningState, string deploymentErrors) + { + return ConnectedEnvironmentStorageProperties(provisioningState: provisioningState, deploymentErrors: deploymentErrors, azureFile: azureFile, smb: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The complex type of the extended location. + /// managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. + /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. + /// Metadata to represent the container app kind, representing if a container app is workflowapp or functionapp. + /// Provisioning state of the Container App. + /// Running status of the Container App. + /// Deprecated. Resource ID of the Container App's environment. + /// Resource ID of environment. + /// Workload profile name to pin for container app execution. + /// Name of the latest revision of the Container App. + /// Name of the latest ready revision of the Container App. + /// Fully Qualified Domain Name of the latest revision of the Container App. + /// Id used to verify domain name ownership. + /// Non versioned Container App configuration properties. + /// Container App versioned application definition. + /// Outbound IP Addresses for container app. + /// The endpoint of the eventstream of the container app. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerAppData ContainerAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, string managedBy, ContainerAppKind? kind, ContainerAppProvisioningState? provisioningState, ContainerAppRunningStatus? runningStatus, ResourceIdentifier managedEnvironmentId, ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, ContainerAppConfiguration configuration, ContainerAppTemplate template, IEnumerable outboundIPAddressList, Uri eventStreamEndpoint) + { + return ContainerAppData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, identity: identity, managedBy: managedBy, kind: kind, provisioningState: provisioningState, runningStatus: runningStatus, deploymentErrors: default, managedEnvironmentId: managedEnvironmentId, environmentId: environmentId, workloadProfileName: workloadProfileName, patchingMode: default, latestRevisionName: latestRevisionName, latestReadyRevisionName: latestReadyRevisionName, latestRevisionFqdn: latestRevisionFqdn, customDomainVerificationId: customDomainVerificationId, configuration: configuration, template: template, outboundIPAddressList: outboundIPAddressList, eventStreamEndpoint: eventStreamEndpoint); + } + + /// Initializes a new instance of . + /// Hostname. + /// Bool indicating if app exposes an external http endpoint. + /// Target Port in containers for traffic from ingress. + /// Exposed Port in containers for TCP traffic from ingress. + /// Ingress transport protocol. + /// Traffic weights for app's revisions. + /// custom domain bindings for Container Apps' hostnames. + /// Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections. + /// Rules to restrict incoming IP address. + /// Sticky Sessions for Single Revision Mode. + /// Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. + /// CORS policy for container app. + /// Settings to expose additional ports on container app. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, ContainerAppIngressTransportMethod? transport, IEnumerable traffic, IEnumerable customDomains, bool? allowInsecure, IEnumerable ipSecurityRestrictions, Affinity? stickySessionsAffinity, ContainerAppIngressClientCertificateMode? clientCertificateMode, ContainerAppCorsPolicy corsPolicy, IEnumerable additionalPortMappings) + { + return ContainerAppIngressConfiguration(fqdn: fqdn, external: external, targetPort: targetPort, exposedPort: exposedPort, transport: transport, traffic: traffic, customDomains: customDomains, allowInsecure: allowInsecure, ipSecurityRestrictions: ipSecurityRestrictions, stickySessionsAffinity: stickySessionsAffinity, clientCertificateMode: clientCertificateMode, corsPolicy: corsPolicy, additionalPortMappings: additionalPortMappings, targetPortHttpScheme: default); + } + + /// Initializes a new instance of . + /// Required CPU in cores, e.g. 0.5. + /// Required memory, e.g. "250Mb". + /// Ephemeral Storage, e.g. "1Gi". + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AppContainerResources AppContainerResources(double? cpu, string memory, string ephemeralStorage) + { + return AppContainerResources(cpu: cpu, memory: memory, ephemeralStorage: ephemeralStorage, gpu: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Timestamp describing when the revision was created + /// by controller + /// + /// Timestamp describing when the revision was last active. Only meaningful when revision is inactive. + /// Fully qualified domain name of the revision. + /// + /// Container App Revision Template with all possible settings and the + /// defaults if user did not provide them. The defaults are populated + /// as they were at the creation time + /// + /// Boolean describing if the Revision is Active. + /// Number of pods currently running for this revision. + /// Traffic weight assigned to this revision. + /// Optional Field - Platform Error Message. + /// Current health State of the revision. + /// Current provisioning State of the revision. + /// Current running state of the revision. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerAppRevisionData ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, DateTimeOffset? lastActiveOn, string fqdn, ContainerAppTemplate template, bool? isActive, int? replicas, int? trafficWeight, string provisioningError, ContainerAppRevisionHealthState? healthState, ContainerAppRevisionProvisioningState? provisioningState, RevisionRunningState? runningState) + { + return ContainerAppRevisionData(id: id, name: name, resourceType: resourceType, systemData: systemData, createdOn: createdOn, lastActiveOn: lastActiveOn, fqdn: fqdn, template: template, isActive: isActive, replicas: replicas, trafficWeight: trafficWeight, labels: default, provisioningError: provisioningError, healthState: healthState, provisioningState: provisioningState, runningState: runningState); + } + + /// Initializes a new instance of . + /// The Name of the Container. + /// The Id of the Container. + /// The container ready status. + /// The container start status. + /// The container restart count. + /// Current running state of the container. + /// The details of container current running state. + /// Log Stream endpoint. + /// Container exec endpoint. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerAppReplicaContainer ContainerAppReplicaContainer(string name, string containerId, bool? isReady, bool? isStarted, int? restartCount, ContainerAppContainerRunningState? runningState, string runningStateDetails, string logStreamEndpoint, string execEndpoint) + { + return ContainerAppReplicaContainer(name: name, containerId: containerId, isReady: isReady, isStarted: isStarted, restartCount: restartCount, runningState: runningState, runningStateDetails: runningStateDetails, logStreamEndpoint: logStreamEndpoint, execEndpoint: execEndpoint, debugEndpoint: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. + /// Provisioning state of the Container Apps Job. + /// Resource ID of environment. + /// Workload profile name to pin for container apps job execution. + /// Container Apps Job configuration properties. + /// Container Apps job definition. + /// Outbound IP Addresses of a container apps job. + /// The endpoint of the eventstream of the container apps job. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerAppJobData ContainerAppJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ContainerAppJobProvisioningState? provisioningState, string environmentId, string workloadProfileName, ContainerAppJobConfiguration configuration, ContainerAppJobTemplate template, IEnumerable outboundIPAddresses, string eventStreamEndpoint) + { + return ContainerAppJobData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: default, identity: identity, provisioningState: provisioningState, runningState: default, environmentId: environmentId, workloadProfileName: workloadProfileName, configuration: configuration, template: template, outboundIPAddresses: outboundIPAddresses, eventStreamEndpoint: eventStreamEndpoint); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Current running State of the job. + /// Job execution start time. + /// Job execution end time. + /// Job's execution container. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerAppJobExecutionData ContainerAppJobExecutionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, JobExecutionRunningState? status, DateTimeOffset? startOn, DateTimeOffset? endOn, ContainerAppJobExecutionTemplate template) + { + return ContainerAppJobExecutionData(id: id, name: name, resourceType: resourceType, systemData: systemData, status: status, startOn: startOn, endOn: endOn, template: template, detailedStatusReplicas: default, reason: default, message: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials in code. + /// Resource ID of the session pool's environment. + /// The container type of the sessions. + /// The pool management type of the session pool. + /// The number of nodes the session pool is using. + /// The scale configuration of the session pool. + /// The secrets of the session pool. + /// The pool configuration if the poolManagementType is dynamic. + /// The custom container configuration if the containerType is CustomContainer. + /// The network configuration of the sessions in the session pool. + /// The endpoint to manage the pool. + /// Provisioning state of the session pool. + /// Optional settings for a Managed Identity that is assigned to the Session pool. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SessionPoolData SessionPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier environmentId, ContainerType? containerType, PoolManagementType? poolManagementType, int? nodeCount, SessionPoolScaleConfiguration scaleConfiguration, IEnumerable secrets, SessionPoolLifecycleConfiguration dynamicPoolLifecycleConfiguration, CustomContainerTemplate customContainerTemplate, SessionNetworkStatus? sessionNetworkStatus, Uri poolManagementEndpoint, SessionPoolProvisioningState? provisioningState, IEnumerable managedIdentitySettings) + { + return SessionPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, environmentId: environmentId, containerType: containerType, poolManagementType: poolManagementType, nodeCount: nodeCount, scaleConfiguration: scaleConfiguration, secrets: secrets, dynamicPoolLifecycleConfiguration: dynamicPoolLifecycleConfiguration, customContainerTemplate: customContainerTemplate, sessionNetworkStatus: sessionNetworkStatus, templateUpdateStatus: default, poolManagementEndpoint: poolManagementEndpoint, provisioningState: provisioningState, managedIdentitySettings: managedIdentitySettings, mcpServerSettings: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static LogicAppData LogicAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData) + { + return LogicAppData(id: id, name: name, resourceType: resourceType, systemData: systemData, properties: default); + } + /// Initializes a new instance of . /// Provisioning state of the certificate. /// Properties for a certificate stored in a Key Vault. @@ -1283,7 +2103,7 @@ public static SpringCloudConfigComponent SpringCloudConfigComponent(JavaComponen [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerAppCertificateProperties ContainerAppCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState, ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, IEnumerable subjectAlternativeNames, byte[] value, string issuer, DateTimeOffset? issueOn, DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { - return ContainerAppCertificateProperties(provisioningState: provisioningState, deploymentErrors: default, certificateKeyVaultProperties: certificateKeyVaultProperties, password: password, subjectName: subjectName, subjectAlternativeNames: subjectAlternativeNames, value: value, issuer: issuer, issueOn: issueOn, expireOn: expireOn, thumbprint: thumbprint, isValid: isValid, publicKeyHash: publicKeyHash); + return ContainerAppCertificateProperties(provisioningState: provisioningState, deploymentErrors: default, certificateKeyVaultProperties: certificateKeyVaultProperties, password: password, subjectName: subjectName, subjectAlternativeNames: subjectAlternativeNames, value: value, issuer: issuer, issueOn: issueOn, expireOn: expireOn, thumbprint: thumbprint, isValid: isValid, publicKeyHash: publicKeyHash, certificateType: default); } /// Initializes a new instance of . @@ -1303,7 +2123,7 @@ public static ContainerAppCertificateProperties ContainerAppCertificatePropertie [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerAppDaprComponentData ContainerAppDaprComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string componentType, string version, bool? ignoreErrors, string initTimeout, IEnumerable secrets, string secretStoreComponent, IEnumerable metadata, IEnumerable scopes) { - return ContainerAppDaprComponentData(id: id, name: name, resourceType: resourceType, systemData: systemData, componentType: componentType, version: version, ignoreErrors: ignoreErrors, initTimeout: initTimeout, secrets: secrets, secretStoreComponent: secretStoreComponent, metadata: metadata, scopes: scopes, provisioningState: default, deploymentErrors: default); + return ContainerAppDaprComponentData(id: id, name: name, resourceType: resourceType, systemData: systemData, componentType: componentType, version: version, ignoreErrors: ignoreErrors, initTimeout: initTimeout, secrets: secrets, secretStoreComponent: secretStoreComponent, metadata: metadata, scopes: scopes, serviceComponentBind: default); } /// Initializes a new instance of . @@ -1333,40 +2153,7 @@ public static ContainerAppDaprComponentData ContainerAppDaprComponentData(Resour [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerAppData ContainerAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, string managedBy, ContainerAppProvisioningState? provisioningState, ContainerAppRunningStatus? runningStatus, ResourceIdentifier managedEnvironmentId, ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, ContainerAppConfiguration configuration, ContainerAppTemplate template, IEnumerable outboundIPAddressList, Uri eventStreamEndpoint) { - return ContainerAppData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, identity: identity, managedBy: managedBy, kind: default, provisioningState: provisioningState, runningStatus: runningStatus, managedEnvironmentId: managedEnvironmentId, environmentId: environmentId, workloadProfileName: workloadProfileName, latestRevisionName: latestRevisionName, latestReadyRevisionName: latestReadyRevisionName, latestRevisionFqdn: latestRevisionFqdn, customDomainVerificationId: customDomainVerificationId, configuration: configuration, template: template, outboundIPAddressList: outboundIPAddressList, eventStreamEndpoint: eventStreamEndpoint); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Kind of the Environment. - /// Managed identities for the Managed Environment to interact with other Azure services without maintaining any secrets or credentials in code. - /// Provisioning state of the Environment. - /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. - /// Application Insights connection string used by Dapr to export Service to Service communication telemetry. - /// Vnet configuration for the environment. - /// Any errors that occurred during deployment or deployment validation. - /// Default Domain Name for the cluster. - /// Static IP of the Environment. - /// Cluster configuration which enables the log daemon to export app logs to configured destination. - /// Whether or not this Managed Environment is zone-redundant. - /// Custom domain configuration for the environment. - /// The endpoint of the eventstream of the Environment. - /// Workload profiles configured for the Managed Environment. - /// The configuration of Keda component. - /// The configuration of Dapr component. - /// Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. - /// Peer authentication settings for the Managed Environment. - /// Peer traffic settings for the Managed Environment. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string kind, ManagedServiceIdentity identity, ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, IPAddress staticIP, ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled, bool? isEnabled) - { - return ContainerAppManagedEnvironmentData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, kind: kind, identity: identity, provisioningState: provisioningState, daprAIInstrumentationKey: daprAIInstrumentationKey, daprAIConnectionString: daprAIConnectionString, vnetConfiguration: vnetConfiguration, deploymentErrors: deploymentErrors, defaultDomain: defaultDomain, staticIP: staticIP, appLogsConfiguration: appLogsConfiguration, isZoneRedundant: isZoneRedundant, customDomainConfiguration: customDomainConfiguration, eventStreamEndpoint: eventStreamEndpoint, workloadProfiles: workloadProfiles, kedaVersion: kedaVersion, daprVersion: daprVersion, infrastructureResourceGroup: infrastructureResourceGroup, isMtlsEnabled: isMtlsEnabled, isEnabled: isEnabled, ingressConfiguration: default, privateEndpointConnections: default, publicNetworkAccess: default); + return ContainerAppData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, identity: identity, managedBy: managedBy, kind: default, provisioningState: provisioningState, runningStatus: runningStatus, deploymentErrors: default, managedEnvironmentId: managedEnvironmentId, environmentId: environmentId, workloadProfileName: workloadProfileName, patchingMode: default, latestRevisionName: latestRevisionName, latestReadyRevisionName: latestReadyRevisionName, latestRevisionFqdn: latestRevisionFqdn, customDomainVerificationId: customDomainVerificationId, configuration: configuration, template: template, outboundIPAddressList: outboundIPAddressList, eventStreamEndpoint: eventStreamEndpoint); } /// Initializes a new instance of . @@ -1400,7 +2187,7 @@ public static ContainerAppCustomDomainConfiguration ContainerAppCustomDomainConf [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerAppCertificateProperties ContainerAppCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState, string password, string subjectName, IEnumerable subjectAlternativeNames, byte[] value, string issuer, DateTimeOffset? issueOn, DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash) { - return ContainerAppCertificateProperties(provisioningState: provisioningState, deploymentErrors: default, certificateKeyVaultProperties: default, password: password, subjectName: subjectName, subjectAlternativeNames: subjectAlternativeNames, value: value, issuer: issuer, issueOn: issueOn, expireOn: expireOn, thumbprint: thumbprint, isValid: isValid, publicKeyHash: publicKeyHash); + return ContainerAppCertificateProperties(provisioningState: provisioningState, deploymentErrors: default, certificateKeyVaultProperties: default, password: password, subjectName: subjectName, subjectAlternativeNames: subjectAlternativeNames, value: value, issuer: issuer, issueOn: issueOn, expireOn: expireOn, thumbprint: thumbprint, isValid: isValid, publicKeyHash: publicKeyHash, certificateType: default); } /// Initializes a new instance of . @@ -1429,43 +2216,7 @@ public static ContainerAppCertificateProperties ContainerAppCertificatePropertie [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerAppData ContainerAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, string managedBy, ContainerAppProvisioningState? provisioningState, ResourceIdentifier managedEnvironmentId, ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, ContainerAppConfiguration configuration, ContainerAppTemplate template, IEnumerable outboundIPAddressList, Uri eventStreamEndpoint) { - return ContainerAppData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, identity: identity, managedBy: managedBy, kind: default, provisioningState: provisioningState, runningStatus: default, managedEnvironmentId: managedEnvironmentId, environmentId: environmentId, workloadProfileName: workloadProfileName, latestRevisionName: latestRevisionName, latestReadyRevisionName: latestReadyRevisionName, latestRevisionFqdn: latestRevisionFqdn, customDomainVerificationId: customDomainVerificationId, configuration: configuration, template: template, outboundIPAddressList: outboundIPAddressList, eventStreamEndpoint: eventStreamEndpoint); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Kind of the Environment. - /// Provisioning state of the Environment. - /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. - /// Application Insights connection string used by Dapr to export Service to Service communication telemetry. - /// Vnet configuration for the environment. - /// Any errors that occurred during deployment or deployment validation. - /// Default Domain Name for the cluster. - /// Static IP of the Environment. - /// - /// Cluster configuration which enables the log daemon to export - /// app logs to a destination. Currently only "log-analytics" is - /// supported - /// - /// Whether or not this Managed Environment is zone-redundant. - /// Custom domain configuration for the environment. - /// The endpoint of the eventstream of the Environment. - /// Workload profiles configured for the Managed Environment. - /// The configuration of Keda component. - /// The configuration of Dapr component. - /// Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. - /// Peer authentication settings for the Managed Environment. - /// Peer traffic settings for the Managed Environment. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string kind, ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, IPAddress staticIP, ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled, bool? isEnabled) - { - return ContainerAppManagedEnvironmentData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, kind: kind, identity: default, provisioningState: provisioningState, daprAIInstrumentationKey: daprAIInstrumentationKey, daprAIConnectionString: daprAIConnectionString, vnetConfiguration: vnetConfiguration, deploymentErrors: deploymentErrors, defaultDomain: defaultDomain, staticIP: staticIP, appLogsConfiguration: appLogsConfiguration, isZoneRedundant: isZoneRedundant, customDomainConfiguration: customDomainConfiguration, eventStreamEndpoint: eventStreamEndpoint, workloadProfiles: workloadProfiles, kedaVersion: kedaVersion, daprVersion: daprVersion, infrastructureResourceGroup: infrastructureResourceGroup, isMtlsEnabled: isMtlsEnabled, isEnabled: isEnabled, ingressConfiguration: default, privateEndpointConnections: default, publicNetworkAccess: default); + return ContainerAppData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, extendedLocation: extendedLocation, identity: identity, managedBy: managedBy, kind: default, provisioningState: provisioningState, runningStatus: default, deploymentErrors: default, managedEnvironmentId: managedEnvironmentId, environmentId: environmentId, workloadProfileName: workloadProfileName, patchingMode: default, latestRevisionName: latestRevisionName, latestReadyRevisionName: latestReadyRevisionName, latestRevisionFqdn: latestRevisionFqdn, customDomainVerificationId: customDomainVerificationId, configuration: configuration, template: template, outboundIPAddressList: outboundIPAddressList, eventStreamEndpoint: eventStreamEndpoint); } /// Initializes a new instance of ContainerAppAuthConfigData. @@ -1502,7 +2253,7 @@ public static ContainerAppAuthConfigData ContainerAppAuthConfigData(ResourceIden [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerAppIngressConfiguration ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, ContainerAppIngressTransportMethod? transport, IEnumerable traffic, IEnumerable customDomains, bool? allowInsecure, IEnumerable ipSecurityRestrictions, Affinity? stickySessionsAffinity, ContainerAppIngressClientCertificateMode? clientCertificateMode, ContainerAppCorsPolicy corsPolicy) { - return ContainerAppIngressConfiguration(fqdn: fqdn, external: external, targetPort: targetPort, exposedPort: exposedPort, transport: transport, traffic: traffic, customDomains: customDomains, allowInsecure: allowInsecure, ipSecurityRestrictions: ipSecurityRestrictions, stickySessionsAffinity: stickySessionsAffinity, clientCertificateMode: clientCertificateMode, corsPolicy: corsPolicy, additionalPortMappings: default); + return ContainerAppIngressConfiguration(fqdn: fqdn, external: external, targetPort: targetPort, exposedPort: exposedPort, transport: transport, traffic: traffic, customDomains: customDomains, allowInsecure: allowInsecure, ipSecurityRestrictions: ipSecurityRestrictions, stickySessionsAffinity: stickySessionsAffinity, clientCertificateMode: clientCertificateMode, corsPolicy: corsPolicy, additionalPortMappings: default, targetPortHttpScheme: default); } /// Initializes a new instance of ContainerAppManagedEnvironmentData. @@ -1537,7 +2288,7 @@ public static ContainerAppIngressConfiguration ContainerAppIngressConfiguration( [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerAppManagedEnvironmentData ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string kind, ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, IPAddress staticIP, ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, IEnumerable workloadProfiles, string kedaVersion, string daprVersion, string infrastructureResourceGroup, bool? isMtlsEnabled) { - return ContainerAppManagedEnvironmentData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, kind: kind, identity: default, provisioningState: provisioningState, daprAIInstrumentationKey: daprAIInstrumentationKey, daprAIConnectionString: daprAIConnectionString, vnetConfiguration: vnetConfiguration, deploymentErrors: deploymentErrors, defaultDomain: defaultDomain, staticIP: staticIP, appLogsConfiguration: appLogsConfiguration, isZoneRedundant: isZoneRedundant, customDomainConfiguration: customDomainConfiguration, eventStreamEndpoint: eventStreamEndpoint, workloadProfiles: workloadProfiles, kedaVersion: kedaVersion, daprVersion: daprVersion, infrastructureResourceGroup: infrastructureResourceGroup, isMtlsEnabled: isMtlsEnabled, isEnabled: default, ingressConfiguration: default, privateEndpointConnections: default, publicNetworkAccess: default); + return ContainerAppManagedEnvironmentData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, kind: kind, identity: default, provisioningState: provisioningState, daprAIInstrumentationKey: daprAIInstrumentationKey, daprAIConnectionString: daprAIConnectionString, vnetConfiguration: vnetConfiguration, deploymentErrors: deploymentErrors, defaultDomain: defaultDomain, privateLinkDefaultDomain: default, staticIP: staticIP, appLogsConfiguration: appLogsConfiguration, appInsightsConnectionString: default, openTelemetryConfiguration: default, isZoneRedundant: isZoneRedundant, availabilityZones: default, customDomainConfiguration: customDomainConfiguration, eventStreamEndpoint: eventStreamEndpoint, workloadProfiles: workloadProfiles, kedaVersion: kedaVersion, daprVersion: daprVersion, infrastructureResourceGroup: infrastructureResourceGroup, isMtlsEnabled: isMtlsEnabled, isPeerToPeerEncryptionEnabled: default, ingressConfiguration: default, privateEndpointConnections: default, publicNetworkAccess: default, diskEncryptionKeyVaultConfiguration: default); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResource.Serialization.cs new file mode 100644 index 000000000000..78f37e5c8cbd --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class BuildResource : IJsonModel + { + private static BuildResourceData s_dataDeserializationInstance; + private static BuildResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + BuildResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + BuildResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResource.cs new file mode 100644 index 000000000000..6209098e94a0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResource.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a BuildResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetBuildResource method. + /// Otherwise you can get one from its parent resource using the GetBuildResource method. + /// + public partial class BuildResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The builderName. + /// The buildName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string builderName, string buildName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _buildResourceBuildsClientDiagnostics; + private readonly BuildsRestOperations _buildResourceBuildsRestClient; + private readonly ClientDiagnostics _buildAuthTokenClientDiagnostics; + private readonly BuildAuthTokenRestOperations _buildAuthTokenRestClient; + private readonly BuildResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/builders/builds"; + + /// Initializes a new instance of the class for mocking. + protected BuildResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuildResource(ArmClient client, BuildResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal BuildResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildResourceBuildsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string buildResourceBuildsApiVersion); + _buildResourceBuildsRestClient = new BuildsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildResourceBuildsApiVersion); + _buildAuthTokenClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _buildAuthTokenRestClient = new BuildAuthTokenRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual BuildResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResource.Get"); + scope.Start(); + try + { + var response = await _buildResourceBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResource.Get"); + scope.Start(); + try + { + var response = _buildResourceBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResource.Delete"); + scope.Start(); + try + { + var response = await _buildResourceBuildsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_buildResourceBuildsClientDiagnostics, Pipeline, _buildResourceBuildsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResource.Delete"); + scope.Start(); + try + { + var response = _buildResourceBuildsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(_buildResourceBuildsClientDiagnostics, Pipeline, _buildResourceBuildsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create or update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BuildResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResource.Update"); + scope.Start(); + try + { + var response = await _buildResourceBuildsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new BuildResourceOperationSource(Client), _buildResourceBuildsClientDiagnostics, Pipeline, _buildResourceBuildsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create or update parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, BuildResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResource.Update"); + scope.Start(); + try + { + var response = _buildResourceBuildsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppContainersArmOperation(new BuildResourceOperationSource(Client), _buildResourceBuildsClientDiagnostics, Pipeline, _buildResourceBuildsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the token used to connect to the endpoint where source code can be uploaded for a build. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken + /// + /// + /// Operation Id + /// BuildAuthToken_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBuildAuthTokenAsync(CancellationToken cancellationToken = default) + { + using var scope = _buildAuthTokenClientDiagnostics.CreateScope("BuildResource.GetBuildAuthToken"); + scope.Start(); + try + { + var response = await _buildAuthTokenRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the token used to connect to the endpoint where source code can be uploaded for a build. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken + /// + /// + /// Operation Id + /// BuildAuthToken_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBuildAuthToken(CancellationToken cancellationToken = default) + { + using var scope = _buildAuthTokenClientDiagnostics.CreateScope("BuildResource.GetBuildAuthToken"); + scope.Start(); + try + { + var response = _buildAuthTokenRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceCollection.cs new file mode 100644 index 000000000000..e80593c58a96 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceCollection.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetBuildResources method from an instance of . + /// + public partial class BuildResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _buildResourceBuildsClientDiagnostics; + private readonly BuildsRestOperations _buildResourceBuildsRestClient; + private readonly ClientDiagnostics _buildResourceBuildsByBuilderResourceClientDiagnostics; + private readonly BuildsByBuilderResourceRestOperations _buildResourceBuildsByBuilderResourceRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuildResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal BuildResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _buildResourceBuildsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", BuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuildResource.ResourceType, out string buildResourceBuildsApiVersion); + _buildResourceBuildsRestClient = new BuildsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildResourceBuildsApiVersion); + _buildResourceBuildsByBuilderResourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", BuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuildResource.ResourceType, out string buildResourceBuildsByBuilderResourceApiVersion); + _buildResourceBuildsByBuilderResourceRestClient = new BuildsByBuilderResourceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, buildResourceBuildsByBuilderResourceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BuilderResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BuilderResource.ResourceType), nameof(id)); + } + + /// + /// Create a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of a build. + /// Resource create or update parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string buildName, BuildResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _buildResourceBuildsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new BuildResourceOperationSource(Client), _buildResourceBuildsClientDiagnostics, Pipeline, _buildResourceBuildsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of a build. + /// Resource create or update parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string buildName, BuildResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _buildResourceBuildsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, data, cancellationToken); + var operation = new AppContainersArmOperation(new BuildResourceOperationSource(Client), _buildResourceBuildsClientDiagnostics, Pipeline, _buildResourceBuildsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.Get"); + scope.Start(); + try + { + var response = await _buildResourceBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.Get"); + scope.Start(); + try + { + var response = _buildResourceBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List BuildResource resources by BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds + /// + /// + /// Operation Id + /// BuildsByBuilderResource_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _buildResourceBuildsByBuilderResourceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _buildResourceBuildsByBuilderResourceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new BuildResource(Client, BuildResourceData.DeserializeBuildResourceData(e)), _buildResourceBuildsByBuilderResourceClientDiagnostics, Pipeline, "BuildResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List BuildResource resources by BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds + /// + /// + /// Operation Id + /// BuildsByBuilderResource_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _buildResourceBuildsByBuilderResourceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _buildResourceBuildsByBuilderResourceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new BuildResource(Client, BuildResourceData.DeserializeBuildResourceData(e)), _buildResourceBuildsByBuilderResourceClientDiagnostics, Pipeline, "BuildResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _buildResourceBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.Exists"); + scope.Start(); + try + { + var response = _buildResourceBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _buildResourceBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _buildResourceBuildsClientDiagnostics.CreateScope("BuildResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _buildResourceBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceData.Serialization.cs new file mode 100644 index 000000000000..124177f8e0cf --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceData.Serialization.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class BuildResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(BuildStatus)) + { + writer.WritePropertyName("buildStatus"u8); + writer.WriteStringValue(BuildStatus.Value.ToString()); + } + if (Optional.IsDefined(DestinationContainerRegistry)) + { + writer.WritePropertyName("destinationContainerRegistry"u8); + writer.WriteObjectValue(DestinationContainerRegistry, options); + } + if (Optional.IsDefined(Configuration)) + { + writer.WritePropertyName("configuration"u8); + writer.WriteObjectValue(Configuration, options); + } + if (options.Format != "W" && Optional.IsDefined(UploadEndpoint)) + { + writer.WritePropertyName("uploadEndpoint"u8); + writer.WriteStringValue(UploadEndpoint); + } + if (options.Format != "W" && Optional.IsDefined(LogStreamEndpoint)) + { + writer.WritePropertyName("logStreamEndpoint"u8); + writer.WriteStringValue(LogStreamEndpoint); + } + if (options.Format != "W" && Optional.IsDefined(TokenEndpoint)) + { + writer.WritePropertyName("tokenEndpoint"u8); + writer.WriteStringValue(TokenEndpoint); + } + writer.WriteEndObject(); + } + + BuildResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBuildResourceData(document.RootElement, options); + } + + internal static BuildResourceData DeserializeBuildResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + BuildProvisioningState? provisioningState = default; + BuildStatus? buildStatus = default; + ContainerRegistryWithCustomImage destinationContainerRegistry = default; + BuildConfiguration configuration = default; + string uploadEndpoint = default; + string logStreamEndpoint = default; + string tokenEndpoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new BuildProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("buildStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + buildStatus = new BuildStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("destinationContainerRegistry"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationContainerRegistry = ContainerRegistryWithCustomImage.DeserializeContainerRegistryWithCustomImage(property0.Value, options); + continue; + } + if (property0.NameEquals("configuration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configuration = BuildConfiguration.DeserializeBuildConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("uploadEndpoint"u8)) + { + uploadEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("logStreamEndpoint"u8)) + { + logStreamEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("tokenEndpoint"u8)) + { + tokenEndpoint = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BuildResourceData( + id, + name, + type, + systemData, + provisioningState, + buildStatus, + destinationContainerRegistry, + configuration, + uploadEndpoint, + logStreamEndpoint, + tokenEndpoint, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BuildStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" buildStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BuildStatus)) + { + builder.Append(" buildStatus: "); + builder.AppendLine($"'{BuildStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DestinationContainerRegistry), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" destinationContainerRegistry: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DestinationContainerRegistry)) + { + builder.Append(" destinationContainerRegistry: "); + BicepSerializationHelpers.AppendChildObject(builder, DestinationContainerRegistry, options, 4, false, " destinationContainerRegistry: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Configuration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configuration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Configuration)) + { + builder.Append(" configuration: "); + BicepSerializationHelpers.AppendChildObject(builder, Configuration, options, 4, false, " configuration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UploadEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uploadEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UploadEndpoint)) + { + builder.Append(" uploadEndpoint: "); + if (UploadEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UploadEndpoint}'''"); + } + else + { + builder.AppendLine($"'{UploadEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LogStreamEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logStreamEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LogStreamEndpoint)) + { + builder.Append(" logStreamEndpoint: "); + if (LogStreamEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LogStreamEndpoint}'''"); + } + else + { + builder.AppendLine($"'{LogStreamEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TokenEndpoint)) + { + builder.Append(" tokenEndpoint: "); + if (TokenEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TokenEndpoint}'''"); + } + else + { + builder.AppendLine($"'{TokenEndpoint}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BuildResourceData)} does not support writing '{options.Format}' format."); + } + } + + BuildResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBuildResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BuildResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceData.cs new file mode 100644 index 000000000000..690b5be4a720 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuildResourceData.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the BuildResource data model. + /// Information pertaining to an individual build. + /// + public partial class BuildResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BuildResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Build provisioning state. + /// Status of the build once it has been provisioned. + /// Container registry that the final image will be uploaded to. + /// Configuration of the build. + /// Endpoint to which the source code should be uploaded. + /// Endpoint from which the build logs can be streamed. + /// Endpoint to use to retrieve an authentication token for log streaming and uploading source code. + /// Keeps track of any properties unknown to the library. + internal BuildResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildProvisioningState? provisioningState, BuildStatus? buildStatus, ContainerRegistryWithCustomImage destinationContainerRegistry, BuildConfiguration configuration, string uploadEndpoint, string logStreamEndpoint, string tokenEndpoint, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + BuildStatus = buildStatus; + DestinationContainerRegistry = destinationContainerRegistry; + Configuration = configuration; + UploadEndpoint = uploadEndpoint; + LogStreamEndpoint = logStreamEndpoint; + TokenEndpoint = tokenEndpoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Build provisioning state. + [WirePath("properties.provisioningState")] + public BuildProvisioningState? ProvisioningState { get; } + /// Status of the build once it has been provisioned. + [WirePath("properties.buildStatus")] + public BuildStatus? BuildStatus { get; } + /// Container registry that the final image will be uploaded to. + [WirePath("properties.destinationContainerRegistry")] + public ContainerRegistryWithCustomImage DestinationContainerRegistry { get; set; } + /// Configuration of the build. + [WirePath("properties.configuration")] + public BuildConfiguration Configuration { get; set; } + /// Endpoint to which the source code should be uploaded. + [WirePath("properties.uploadEndpoint")] + public string UploadEndpoint { get; } + /// Endpoint from which the build logs can be streamed. + [WirePath("properties.logStreamEndpoint")] + public string LogStreamEndpoint { get; } + /// Endpoint to use to retrieve an authentication token for log streaming and uploading source code. + [WirePath("properties.tokenEndpoint")] + public string TokenEndpoint { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResource.Serialization.cs new file mode 100644 index 000000000000..191edc363da4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class BuilderResource : IJsonModel + { + private static BuilderResourceData s_dataDeserializationInstance; + private static BuilderResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + BuilderResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + BuilderResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResource.cs new file mode 100644 index 000000000000..786ba6ac6d40 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResource.cs @@ -0,0 +1,776 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a BuilderResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetBuilderResource method. + /// Otherwise you can get one from its parent resource using the GetBuilderResource method. + /// + public partial class BuilderResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The builderName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string builderName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _builderResourceBuildersClientDiagnostics; + private readonly BuildersRestOperations _builderResourceBuildersRestClient; + private readonly BuilderResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/builders"; + + /// Initializes a new instance of the class for mocking. + protected BuilderResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BuilderResource(ArmClient client, BuilderResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal BuilderResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _builderResourceBuildersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string builderResourceBuildersApiVersion); + _builderResourceBuildersRestClient = new BuildersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, builderResourceBuildersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual BuilderResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of BuildResources in the BuilderResource. + /// An object representing collection of BuildResources and their operations over a BuildResource. + public virtual BuildResourceCollection GetBuildResources() + { + return GetCachedClient(client => new BuildResourceCollection(client, Id)); + } + + /// + /// Get a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetBuildResourceAsync(string buildName, CancellationToken cancellationToken = default) + { + return await GetBuildResources().GetAsync(buildName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a BuildResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} + /// + /// + /// Operation Id + /// Builds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetBuildResource(string buildName, CancellationToken cancellationToken = default) + { + return GetBuildResources().Get(buildName, cancellationToken); + } + + /// + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.Get"); + scope.Start(); + try + { + var response = await _builderResourceBuildersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.Get"); + scope.Start(); + try + { + var response = _builderResourceBuildersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.Delete"); + scope.Start(); + try + { + var response = await _builderResourceBuildersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_builderResourceBuildersClientDiagnostics, Pipeline, _builderResourceBuildersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.Delete"); + scope.Start(); + try + { + var response = _builderResourceBuildersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(_builderResourceBuildersClientDiagnostics, Pipeline, _builderResourceBuildersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Update + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BuilderResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.Update"); + scope.Start(); + try + { + var response = await _builderResourceBuildersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildersClientDiagnostics, Pipeline, _builderResourceBuildersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Update + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, BuilderResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.Update"); + scope.Start(); + try + { + var response = _builderResourceBuildersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new AppContainersArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildersClientDiagnostics, Pipeline, _builderResourceBuildersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _builderResourceBuildersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new BuilderResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new BuilderResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _builderResourceBuildersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new BuilderResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new BuilderResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _builderResourceBuildersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new BuilderResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new BuilderResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _builderResourceBuildersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new BuilderResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new BuilderResourcePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _builderResourceBuildersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new BuilderResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new BuilderResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _builderResourceBuildersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new BuilderResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new BuilderResourcePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceCollection.cs new file mode 100644 index 000000000000..0867c4a8ba82 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetBuilderResources method from an instance of . + /// + public partial class BuilderResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _builderResourceBuildersClientDiagnostics; + private readonly BuildersRestOperations _builderResourceBuildersRestClient; + + /// Initializes a new instance of the class for mocking. + protected BuilderResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal BuilderResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _builderResourceBuildersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", BuilderResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BuilderResource.ResourceType, out string builderResourceBuildersApiVersion); + _builderResourceBuildersRestClient = new BuildersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, builderResourceBuildersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create or update a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the builder. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _builderResourceBuildersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, builderName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildersClientDiagnostics, Pipeline, _builderResourceBuildersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the builder. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _builderResourceBuildersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, builderName, data, cancellationToken); + var operation = new AppContainersArmOperation(new BuilderResourceOperationSource(Client), _builderResourceBuildersClientDiagnostics, Pipeline, _builderResourceBuildersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, builderName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.Get"); + scope.Start(); + try + { + var response = await _builderResourceBuildersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, builderName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.Get"); + scope.Start(); + try + { + var response = _builderResourceBuildersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, builderName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List BuilderResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders + /// + /// + /// Operation Id + /// Builders_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _builderResourceBuildersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _builderResourceBuildersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new BuilderResource(Client, BuilderResourceData.DeserializeBuilderResourceData(e)), _builderResourceBuildersClientDiagnostics, Pipeline, "BuilderResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List BuilderResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders + /// + /// + /// Operation Id + /// Builders_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _builderResourceBuildersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _builderResourceBuildersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new BuilderResource(Client, BuilderResourceData.DeserializeBuilderResourceData(e)), _builderResourceBuildersClientDiagnostics, Pipeline, "BuilderResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _builderResourceBuildersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, builderName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.Exists"); + scope.Start(); + try + { + var response = _builderResourceBuildersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, builderName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _builderResourceBuildersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, builderName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var scope = _builderResourceBuildersClientDiagnostics.CreateScope("BuilderResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _builderResourceBuildersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, builderName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BuilderResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceData.Serialization.cs new file mode 100644 index 000000000000..9532705264e6 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceData.Serialization.cs @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class BuilderResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuilderResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"u8); + writer.WriteStringValue(EnvironmentId); + } + if (Optional.IsCollectionDefined(ContainerRegistries)) + { + writer.WritePropertyName("containerRegistries"u8); + writer.WriteStartArray(); + foreach (var item in ContainerRegistries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + BuilderResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuilderResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBuilderResourceData(document.RootElement, options); + } + + internal static BuilderResourceData DeserializeBuilderResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + BuilderProvisioningState? provisioningState = default; + ResourceIdentifier environmentId = default; + IList containerRegistries = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new BuilderProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("environmentId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + environmentId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("containerRegistries"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ContainerRegistry.DeserializeContainerRegistry(item, options)); + } + containerRegistries = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BuilderResourceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + identity, + provisioningState, + environmentId, + containerRegistries ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environmentId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnvironmentId)) + { + builder.Append(" environmentId: "); + builder.AppendLine($"'{EnvironmentId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerRegistries), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerRegistries: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ContainerRegistries)) + { + if (ContainerRegistries.Any()) + { + builder.Append(" containerRegistries: "); + builder.AppendLine("["); + foreach (var item in ContainerRegistries) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " containerRegistries: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BuilderResourceData)} does not support writing '{options.Format}' format."); + } + } + + BuilderResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBuilderResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BuilderResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceData.cs new file mode 100644 index 000000000000..63017f751053 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/BuilderResourceData.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the BuilderResource data model. + /// Information about the SourceToCloud builder resource. + /// + public partial class BuilderResourceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public BuilderResourceData(AzureLocation location) : base(location) + { + ContainerRegistries = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The managed service identities assigned to this resource. + /// Provisioning state of a builder resource. + /// Resource ID of the container apps environment that the builder is associated with. + /// List of mappings of container registries and the managed identity used to connect to it. + /// Keeps track of any properties unknown to the library. + internal BuilderResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, BuilderProvisioningState? provisioningState, ResourceIdentifier environmentId, IList containerRegistries, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + ProvisioningState = provisioningState; + EnvironmentId = environmentId; + ContainerRegistries = containerRegistries; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BuilderResourceData() + { + } + + /// The managed service identities assigned to this resource. + [WirePath("identity")] + public ManagedServiceIdentity Identity { get; set; } + /// Provisioning state of a builder resource. + [WirePath("properties.provisioningState")] + public BuilderProvisioningState? ProvisioningState { get; } + /// Resource ID of the container apps environment that the builder is associated with. + [WirePath("properties.environmentId")] + public ResourceIdentifier EnvironmentId { get; set; } + /// List of mappings of container registries and the managed identity used to connect to it. + [WirePath("properties.containerRegistries")] + public IList ContainerRegistries { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ConnectedEnvironmentDaprComponentData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ConnectedEnvironmentDaprComponentData.Serialization.cs new file mode 100644 index 000000000000..dfad280e23e0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ConnectedEnvironmentDaprComponentData.Serialization.cs @@ -0,0 +1,676 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class ConnectedEnvironmentDaprComponentData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ComponentType)) + { + writer.WritePropertyName("componentType"u8); + writer.WriteStringValue(ComponentType); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(IgnoreErrors)) + { + writer.WritePropertyName("ignoreErrors"u8); + writer.WriteBooleanValue(IgnoreErrors.Value); + } + if (Optional.IsDefined(InitTimeout)) + { + writer.WritePropertyName("initTimeout"u8); + writer.WriteStringValue(InitTimeout); + } + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartArray(); + foreach (var item in Secrets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SecretStoreComponent)) + { + writer.WritePropertyName("secretStoreComponent"u8); + writer.WriteStringValue(SecretStoreComponent); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Scopes)) + { + writer.WritePropertyName("scopes"u8); + writer.WriteStartArray(); + foreach (var item in Scopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ServiceComponentBind)) + { + writer.WritePropertyName("serviceComponentBind"u8); + writer.WriteStartArray(); + foreach (var item in ServiceComponentBind) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DeploymentErrors)) + { + writer.WritePropertyName("deploymentErrors"u8); + writer.WriteStringValue(DeploymentErrors); + } + writer.WriteEndObject(); + } + + ConnectedEnvironmentDaprComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedEnvironmentDaprComponentData(document.RootElement, options); + } + + internal static ConnectedEnvironmentDaprComponentData DeserializeConnectedEnvironmentDaprComponentData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string componentType = default; + string version = default; + bool? ignoreErrors = default; + string initTimeout = default; + IList secrets = default; + string secretStoreComponent = default; + IList metadata = default; + IList scopes = default; + IList serviceComponentBind = default; + ConnectedEnvironmentDaprComponentProvisioningState? provisioningState = default; + string deploymentErrors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("componentType"u8)) + { + componentType = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("ignoreErrors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ignoreErrors = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("initTimeout"u8)) + { + initTimeout = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("secrets"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ContainerAppWritableSecret.DeserializeContainerAppWritableSecret(item, options)); + } + secrets = array; + continue; + } + if (property0.NameEquals("secretStoreComponent"u8)) + { + secretStoreComponent = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ContainerAppDaprMetadata.DeserializeContainerAppDaprMetadata(item, options)); + } + metadata = array; + continue; + } + if (property0.NameEquals("scopes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scopes = array; + continue; + } + if (property0.NameEquals("serviceComponentBind"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(DaprComponentServiceBinding.DeserializeDaprComponentServiceBinding(item, options)); + } + serviceComponentBind = array; + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ConnectedEnvironmentDaprComponentProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("deploymentErrors"u8)) + { + deploymentErrors = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedEnvironmentDaprComponentData( + id, + name, + type, + systemData, + componentType, + version, + ignoreErrors, + initTimeout, + secrets ?? new ChangeTrackingList(), + secretStoreComponent, + metadata ?? new ChangeTrackingList(), + scopes ?? new ChangeTrackingList(), + serviceComponentBind ?? new ChangeTrackingList(), + provisioningState, + deploymentErrors, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComponentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" componentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComponentType)) + { + builder.Append(" componentType: "); + if (ComponentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ComponentType}'''"); + } + else + { + builder.AppendLine($"'{ComponentType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IgnoreErrors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ignoreErrors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IgnoreErrors)) + { + builder.Append(" ignoreErrors: "); + var boolValue = IgnoreErrors.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InitTimeout), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" initTimeout: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InitTimeout)) + { + builder.Append(" initTimeout: "); + if (InitTimeout.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{InitTimeout}'''"); + } + else + { + builder.AppendLine($"'{InitTimeout}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Secrets), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secrets: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Secrets)) + { + if (Secrets.Any()) + { + builder.Append(" secrets: "); + builder.AppendLine("["); + foreach (var item in Secrets) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " secrets: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretStoreComponent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretStoreComponent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretStoreComponent)) + { + builder.Append(" secretStoreComponent: "); + if (SecretStoreComponent.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretStoreComponent}'''"); + } + else + { + builder.AppendLine($"'{SecretStoreComponent}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata.Any()) + { + builder.Append(" metadata: "); + builder.AppendLine("["); + foreach (var item in Metadata) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " metadata: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scopes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scopes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Scopes)) + { + if (Scopes.Any()) + { + builder.Append(" scopes: "); + builder.AppendLine("["); + foreach (var item in Scopes) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceComponentBind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceComponentBind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServiceComponentBind)) + { + if (ServiceComponentBind.Any()) + { + builder.Append(" serviceComponentBind: "); + builder.AppendLine("["); + foreach (var item in ServiceComponentBind) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " serviceComponentBind: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentErrors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deploymentErrors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentErrors)) + { + builder.Append(" deploymentErrors: "); + if (DeploymentErrors.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentErrors}'''"); + } + else + { + builder.AppendLine($"'{DeploymentErrors}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentData)} does not support writing '{options.Format}' format."); + } + } + + ConnectedEnvironmentDaprComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectedEnvironmentDaprComponentData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ConnectedEnvironmentDaprComponentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ConnectedEnvironmentDaprComponentData.cs new file mode 100644 index 000000000000..e8cd8836ba29 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ConnectedEnvironmentDaprComponentData.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the ConnectedEnvironmentDaprComponent data model. + /// Dapr Component. + /// + public partial class ConnectedEnvironmentDaprComponentData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectedEnvironmentDaprComponentData() + { + Secrets = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); + Scopes = new ChangeTrackingList(); + ServiceComponentBind = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Component type. + /// Component version. + /// Boolean describing if the component errors are ignores. + /// Initialization timeout. + /// Collection of secrets used by a Dapr component. + /// Name of a Dapr component to retrieve component secrets from. + /// Component metadata. + /// Names of container apps that can use this Dapr component. + /// List of container app services that are bound to the Dapr component. + /// Provisioning state of the Connected Environment Dapr Component. + /// Any errors that occurred during deployment or deployment validation. + /// Keeps track of any properties unknown to the library. + internal ConnectedEnvironmentDaprComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string componentType, string version, bool? ignoreErrors, string initTimeout, IList secrets, string secretStoreComponent, IList metadata, IList scopes, IList serviceComponentBind, ConnectedEnvironmentDaprComponentProvisioningState? provisioningState, string deploymentErrors, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ComponentType = componentType; + Version = version; + IgnoreErrors = ignoreErrors; + InitTimeout = initTimeout; + Secrets = secrets; + SecretStoreComponent = secretStoreComponent; + Metadata = metadata; + Scopes = scopes; + ServiceComponentBind = serviceComponentBind; + ProvisioningState = provisioningState; + DeploymentErrors = deploymentErrors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Component type. + [WirePath("properties.componentType")] + public string ComponentType { get; set; } + /// Component version. + [WirePath("properties.version")] + public string Version { get; set; } + /// Boolean describing if the component errors are ignores. + [WirePath("properties.ignoreErrors")] + public bool? IgnoreErrors { get; set; } + /// Initialization timeout. + [WirePath("properties.initTimeout")] + public string InitTimeout { get; set; } + /// Collection of secrets used by a Dapr component. + [WirePath("properties.secrets")] + public IList Secrets { get; } + /// Name of a Dapr component to retrieve component secrets from. + [WirePath("properties.secretStoreComponent")] + public string SecretStoreComponent { get; set; } + /// Component metadata. + [WirePath("properties.metadata")] + public IList Metadata { get; } + /// Names of container apps that can use this Dapr component. + [WirePath("properties.scopes")] + public IList Scopes { get; } + /// List of container app services that are bound to the Dapr component. + [WirePath("properties.serviceComponentBind")] + public IList ServiceComponentBind { get; } + /// Provisioning state of the Connected Environment Dapr Component. + [WirePath("properties.provisioningState")] + public ConnectedEnvironmentDaprComponentProvisioningState? ProvisioningState { get; } + /// Any errors that occurred during deployment or deployment validation. + [WirePath("properties.deploymentErrors")] + public string DeploymentErrors { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigCollection.cs index 0bae16e0b5e9..60f52adc3234 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string authConfigNam /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string authConfigName, Can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string authConfigName, CancellationToken ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.cs index 100505416847..321bcef05a31 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs index 58c87ae49e2b..ae46819c3d1b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string contai /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string containerAppName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string containerAppName, C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string containerAppName, CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateCollection.cs index dd72635f6ecb..c2b91f47aa02 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string certificateName, Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string certificateName, CancellationToken c /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.cs index d1537e18787d..729af02051dd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response Add /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response Set /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs index 1038415793cb..7c9d742755db 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string con /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string connectedEnvironmen /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string connectedEnvironmentName, Cancellati /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentCollection.cs index bc21c95fe55b..322fe79ed707 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -78,7 +78,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string componentName, ContainerAppDaprComponentData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string componentName, ConnectedEnvironmentDaprComponentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); Argument.AssertNotNull(data, nameof(data)); @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -127,7 +127,7 @@ public virtual async Task The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string componentName, ContainerAppDaprComponentData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string componentName, ConnectedEnvironmentDaprComponentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); Argument.AssertNotNull(data, nameof(data)); @@ -162,7 +162,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual AsyncPageable _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppConnectedEnvironmentDaprComponentResource(Client, ContainerAppDaprComponentData.DeserializeContainerAppDaprComponentData(e)), _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsClientDiagnostics, Pipeline, "ContainerAppConnectedEnvironmentDaprComponentCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppConnectedEnvironmentDaprComponentResource(Client, ConnectedEnvironmentDaprComponentData.DeserializeConnectedEnvironmentDaprComponentData(e)), _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsClientDiagnostics, Pipeline, "ContainerAppConnectedEnvironmentDaprComponentCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -282,7 +282,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -296,7 +296,7 @@ public virtual Pageable G { HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppConnectedEnvironmentDaprComponentResource(Client, ContainerAppDaprComponentData.DeserializeContainerAppDaprComponentData(e)), _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsClientDiagnostics, Pipeline, "ContainerAppConnectedEnvironmentDaprComponentCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppConnectedEnvironmentDaprComponentResource(Client, ConnectedEnvironmentDaprComponentData.DeserializeConnectedEnvironmentDaprComponentData(e)), _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsClientDiagnostics, Pipeline, "ContainerAppConnectedEnvironmentDaprComponentCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -312,7 +312,7 @@ public virtual Pageable G /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string componentName, Canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string componentName, CancellationToken can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs index 889d0d188cd2..1c4bae033763 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.AppContainers { - public partial class ContainerAppConnectedEnvironmentDaprComponentResource : IJsonModel + public partial class ContainerAppConnectedEnvironmentDaprComponentResource : IJsonModel { - private static ContainerAppDaprComponentData s_dataDeserializationInstance; - private static ContainerAppDaprComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static ConnectedEnvironmentDaprComponentData s_dataDeserializationInstance; + private static ConnectedEnvironmentDaprComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppDaprComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + ConnectedEnvironmentDaprComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); - ContainerAppDaprComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + ConnectedEnvironmentDaprComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.cs index 347dc9f407e3..2fe9a4015147 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.cs @@ -37,7 +37,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsClientDiagnostics; private readonly ConnectedEnvironmentsDaprComponentsRestOperations _containerAppConnectedEnvironmentDaprComponentConnectedEnvironmentsDaprComponentsRestClient; - private readonly ContainerAppDaprComponentData _data; + private readonly ConnectedEnvironmentDaprComponentData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.App/connectedEnvironments/daprComponents"; @@ -50,7 +50,7 @@ protected ContainerAppConnectedEnvironmentDaprComponentResource() /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal ContainerAppConnectedEnvironmentDaprComponentResource(ArmClient client, ContainerAppDaprComponentData data) : this(client, data.Id) + internal ContainerAppConnectedEnvironmentDaprComponentResource(ArmClient client, ConnectedEnvironmentDaprComponentData data) : this(client, data.Id) { HasData = true; _data = data; @@ -74,7 +74,7 @@ internal ContainerAppConnectedEnvironmentDaprComponentResource(ArmClient client, /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual ContainerAppDaprComponentData Data + public virtual ConnectedEnvironmentDaprComponentData Data { get { @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Configuration details of the Dapr Component. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerAppDaprComponentData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedEnvironmentDaprComponentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task Configuration details of the Dapr Component. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerAppDaprComponentData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedEnvironmentDaprComponentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -359,7 +359,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -388,7 +388,7 @@ public virtual AsyncPageable GetSecretsAsync(Cancellatio /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs index f6a84ea7fe2c..e2107ecc8096 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.cs @@ -110,7 +110,7 @@ public virtual ContainerAppConnectedEnvironmentCertificateCollection GetContaine /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ContainerAppConnectedEnvironmentDaprComponentCollection GetContai /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual ContainerAppConnectedEnvironmentStorageCollection GetContainerApp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetCont /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -516,7 +516,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -558,7 +558,7 @@ public virtual Response Update(Contain /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -600,7 +600,7 @@ public virtual async Task> CheckNam /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -642,7 +642,7 @@ public virtual Response CheckNameAvailabilit /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -704,7 +704,7 @@ public virtual async Task> Ad /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -766,7 +766,7 @@ public virtual Response AddTag(string /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -823,7 +823,7 @@ public virtual async Task> Se /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -880,7 +880,7 @@ public virtual Response SetTags(IDicti /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -940,7 +940,7 @@ public virtual async Task> Re /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageCollection.cs index e37d40d7966b..52e66ae819a4 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string storageName, Cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string storageName, CancellationToken cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.cs index eb1daeeba05e..36fbc44c9e7e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.Serialization.cs index 35074c5e1e2d..0e36dd28aa8f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.Serialization.cs @@ -96,15 +96,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + if (Optional.IsCollectionDefined(ServiceComponentBind)) { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(DeploymentErrors)) - { - writer.WritePropertyName("deploymentErrors"u8); - writer.WriteStringValue(DeploymentErrors); + writer.WritePropertyName("serviceComponentBind"u8); + writer.WriteStartArray(); + foreach (var item in ServiceComponentBind) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } writer.WriteEndObject(); } @@ -141,8 +141,7 @@ internal static ContainerAppDaprComponentData DeserializeContainerAppDaprCompone string secretStoreComponent = default; IList metadata = default; IList scopes = default; - DaprComponentProvisioningState? provisioningState = default; - string deploymentErrors = default; + IList serviceComponentBind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -251,18 +250,18 @@ internal static ContainerAppDaprComponentData DeserializeContainerAppDaprCompone scopes = array; continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("serviceComponentBind"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new DaprComponentProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("deploymentErrors"u8)) - { - deploymentErrors = property0.Value.GetString(); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(DaprComponentServiceBinding.DeserializeDaprComponentServiceBinding(item, options)); + } + serviceComponentBind = array; continue; } } @@ -287,8 +286,7 @@ internal static ContainerAppDaprComponentData DeserializeContainerAppDaprCompone secretStoreComponent, metadata ?? new ChangeTrackingList(), scopes ?? new ChangeTrackingList(), - provisioningState, - deploymentErrors, + serviceComponentBind ?? new ChangeTrackingList(), serializedAdditionalRawData); } @@ -548,40 +546,25 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceComponentBind), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" provisioningState: "); + builder.Append(" serviceComponentBind: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(ProvisioningState)) + if (Optional.IsCollectionDefined(ServiceComponentBind)) { - builder.Append(" provisioningState: "); - builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentErrors), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" deploymentErrors: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(DeploymentErrors)) - { - builder.Append(" deploymentErrors: "); - if (DeploymentErrors.Contains(Environment.NewLine)) + if (ServiceComponentBind.Any()) { - builder.AppendLine("'''"); - builder.AppendLine($"{DeploymentErrors}'''"); - } - else - { - builder.AppendLine($"'{DeploymentErrors}'"); + builder.Append(" serviceComponentBind: "); + builder.AppendLine("["); + foreach (var item in ServiceComponentBind) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " serviceComponentBind: "); + } + builder.AppendLine(" ]"); } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.cs index e01da681be2e..9b68f1fe1ebb 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDaprComponentData.cs @@ -57,6 +57,7 @@ public ContainerAppDaprComponentData() Secrets = new ChangeTrackingList(); Metadata = new ChangeTrackingList(); Scopes = new ChangeTrackingList(); + ServiceComponentBind = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -72,10 +73,9 @@ public ContainerAppDaprComponentData() /// Name of a Dapr component to retrieve component secrets from. /// Component metadata. /// Names of container apps that can use this Dapr component. - /// Provisioning state of the Dapr Component. - /// Any errors that occurred during deployment or deployment validation. + /// List of container app services that are bound to the Dapr component. /// Keeps track of any properties unknown to the library. - internal ContainerAppDaprComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string componentType, string version, bool? ignoreErrors, string initTimeout, IList secrets, string secretStoreComponent, IList metadata, IList scopes, DaprComponentProvisioningState? provisioningState, string deploymentErrors, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ContainerAppDaprComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string componentType, string version, bool? ignoreErrors, string initTimeout, IList secrets, string secretStoreComponent, IList metadata, IList scopes, IList serviceComponentBind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ComponentType = componentType; Version = version; @@ -85,8 +85,7 @@ internal ContainerAppDaprComponentData(ResourceIdentifier id, string name, Resou SecretStoreComponent = secretStoreComponent; Metadata = metadata; Scopes = scopes; - ProvisioningState = provisioningState; - DeploymentErrors = deploymentErrors; + ServiceComponentBind = serviceComponentBind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -114,11 +113,8 @@ internal ContainerAppDaprComponentData(ResourceIdentifier id, string name, Resou /// Names of container apps that can use this Dapr component. [WirePath("properties.scopes")] public IList Scopes { get; } - /// Provisioning state of the Dapr Component. - [WirePath("properties.provisioningState")] - public DaprComponentProvisioningState? ProvisioningState { get; } - /// Any errors that occurred during deployment or deployment validation. - [WirePath("properties.deploymentErrors")] - public string DeploymentErrors { get; } + /// List of container app services that are bound to the Dapr component. + [WirePath("properties.serviceComponentBind")] + public IList ServiceComponentBind { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.Serialization.cs index 0ad04e144966..8345e0cc2814 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.Serialization.cs @@ -72,6 +72,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("runningStatus"u8); writer.WriteStringValue(RunningStatus.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(DeploymentErrors)) + { + writer.WritePropertyName("deploymentErrors"u8); + writer.WriteStringValue(DeploymentErrors); + } if (Optional.IsDefined(ManagedEnvironmentId)) { writer.WritePropertyName("managedEnvironmentId"u8); @@ -87,6 +92,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("workloadProfileName"u8); writer.WriteStringValue(WorkloadProfileName); } + if (Optional.IsDefined(PatchingConfiguration)) + { + writer.WritePropertyName("patchingConfiguration"u8); + writer.WriteObjectValue(PatchingConfiguration, options); + } if (options.Format != "W" && Optional.IsDefined(LatestRevisionName)) { writer.WritePropertyName("latestRevisionName"u8); @@ -172,9 +182,11 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element SystemData systemData = default; ContainerAppProvisioningState? provisioningState = default; ContainerAppRunningStatus? runningStatus = default; + string deploymentErrors = default; ResourceIdentifier managedEnvironmentId = default; ResourceIdentifier environmentId = default; string workloadProfileName = default; + ContainerAppPropertiesPatchingConfiguration patchingConfiguration = default; string latestRevisionName = default; string latestReadyRevisionName = default; string latestRevisionFqdn = default; @@ -289,6 +301,11 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element runningStatus = new ContainerAppRunningStatus(property0.Value.GetString()); continue; } + if (property0.NameEquals("deploymentErrors"u8)) + { + deploymentErrors = property0.Value.GetString(); + continue; + } if (property0.NameEquals("managedEnvironmentId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -312,6 +329,15 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element workloadProfileName = property0.Value.GetString(); continue; } + if (property0.NameEquals("patchingConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchingConfiguration = ContainerAppPropertiesPatchingConfiguration.DeserializeContainerAppPropertiesPatchingConfiguration(property0.Value, options); + continue; + } if (property0.NameEquals("latestRevisionName"u8)) { latestRevisionName = property0.Value.GetString(); @@ -402,9 +428,11 @@ internal static ContainerAppData DeserializeContainerAppData(JsonElement element kind, provisioningState, runningStatus, + deploymentErrors, managedEnvironmentId, environmentId, workloadProfileName, + patchingConfiguration, latestRevisionName, latestReadyRevisionName, latestRevisionFqdn, @@ -629,6 +657,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentErrors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deploymentErrors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentErrors)) + { + builder.Append(" deploymentErrors: "); + if (DeploymentErrors.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentErrors}'''"); + } + else + { + builder.AppendLine($"'{DeploymentErrors}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagedEnvironmentId), out propertyOverride); if (hasPropertyOverride) { @@ -682,6 +733,26 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("PatchingMode", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchingConfiguration: "); + builder.AppendLine("{"); + builder.AppendLine(" patchingConfiguration: {"); + builder.Append(" patchingMode: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(PatchingConfiguration)) + { + builder.Append(" patchingConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, PatchingConfiguration, options, 4, false, " patchingConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LatestRevisionName), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs index 6268ab3b534b..a7ba7dc0a5b5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppData.cs @@ -69,12 +69,14 @@ public ContainerAppData(AzureLocation location) : base(location) /// The complex type of the extended location. /// managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. - /// Metadata to represent the container app kind, representing if a container app is workflowapp or functionapp. + /// Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. /// Provisioning state of the Container App. /// Running status of the Container App. + /// Any errors that occurred during deployment. /// Deprecated. Resource ID of the Container App's environment. /// Resource ID of environment. /// Workload profile name to pin for container app execution. + /// Container App auto patch configuration. /// Name of the latest revision of the Container App. /// Name of the latest ready revision of the Container App. /// Fully Qualified Domain Name of the latest revision of the Container App. @@ -84,7 +86,7 @@ public ContainerAppData(AzureLocation location) : base(location) /// Outbound IP Addresses for container app. /// The endpoint of the eventstream of the container app. /// Keeps track of any properties unknown to the library. - internal ContainerAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, string managedBy, ContainerAppKind? kind, ContainerAppProvisioningState? provisioningState, ContainerAppRunningStatus? runningStatus, ResourceIdentifier managedEnvironmentId, ResourceIdentifier environmentId, string workloadProfileName, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, ContainerAppConfiguration configuration, ContainerAppTemplate template, IReadOnlyList outboundIPAddressList, Uri eventStreamEndpoint, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, string managedBy, ContainerAppKind? kind, ContainerAppProvisioningState? provisioningState, ContainerAppRunningStatus? runningStatus, string deploymentErrors, ResourceIdentifier managedEnvironmentId, ResourceIdentifier environmentId, string workloadProfileName, ContainerAppPropertiesPatchingConfiguration patchingConfiguration, string latestRevisionName, string latestReadyRevisionName, string latestRevisionFqdn, string customDomainVerificationId, ContainerAppConfiguration configuration, ContainerAppTemplate template, IReadOnlyList outboundIPAddressList, Uri eventStreamEndpoint, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; Identity = identity; @@ -92,9 +94,11 @@ internal ContainerAppData(ResourceIdentifier id, string name, ResourceType resou Kind = kind; ProvisioningState = provisioningState; RunningStatus = runningStatus; + DeploymentErrors = deploymentErrors; ManagedEnvironmentId = managedEnvironmentId; EnvironmentId = environmentId; WorkloadProfileName = workloadProfileName; + PatchingConfiguration = patchingConfiguration; LatestRevisionName = latestRevisionName; LatestReadyRevisionName = latestReadyRevisionName; LatestRevisionFqdn = latestRevisionFqdn; @@ -120,7 +124,7 @@ internal ContainerAppData() /// The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. [WirePath("managedBy")] public string ManagedBy { get; set; } - /// Metadata to represent the container app kind, representing if a container app is workflowapp or functionapp. + /// Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. [WirePath("kind")] public ContainerAppKind? Kind { get; set; } /// Provisioning state of the Container App. @@ -129,6 +133,9 @@ internal ContainerAppData() /// Running status of the Container App. [WirePath("properties.runningStatus")] public ContainerAppRunningStatus? RunningStatus { get; } + /// Any errors that occurred during deployment. + [WirePath("properties.deploymentErrors")] + public string DeploymentErrors { get; } /// Deprecated. Resource ID of the Container App's environment. [WirePath("properties.managedEnvironmentId")] public ResourceIdentifier ManagedEnvironmentId { get; set; } @@ -138,6 +145,21 @@ internal ContainerAppData() /// Workload profile name to pin for container app execution. [WirePath("properties.workloadProfileName")] public string WorkloadProfileName { get; set; } + /// Container App auto patch configuration. + internal ContainerAppPropertiesPatchingConfiguration PatchingConfiguration { get; set; } + /// Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + [WirePath("properties.patchingConfiguration.patchingMode")] + public PatchingMode? PatchingMode + { + get => PatchingConfiguration is null ? default : PatchingConfiguration.PatchingMode; + set + { + if (PatchingConfiguration is null) + PatchingConfiguration = new ContainerAppPropertiesPatchingConfiguration(); + PatchingConfiguration.PatchingMode = value; + } + } + /// Name of the latest revision of the Container App. [WirePath("properties.latestRevisionName")] public string LatestRevisionName { get; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorCollection.cs index d2b819c92197..cd6664654407 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string detectorName, C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string detectorName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string detectorName, CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.cs index 1c475fb0a37b..1484bf79aed0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionCollection.cs index 8773acaa5117..9b4d09097fe2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(str /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string revisionName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string revisionName, CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.cs index 482db00f1346..01316bccf5fb 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.cs index c17aa6aca4c6..a7c42fdaca3c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigCollection.cs index 0be4a534a799..53f67df6a6f0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -74,7 +74,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the Http Route Config Resource. - /// Http Route Config to be created or updated. + /// Http Route config to be created or updated. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -115,7 +115,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -125,7 +125,7 @@ public virtual async Task> Cre /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the Http Route Config Resource. - /// Http Route Config to be created or updated. + /// Http Route config to be created or updated. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -154,7 +154,7 @@ public virtual ArmOperation CreateOrUpdate( } /// - /// Get the specified Http Route Config. + /// Get the specified Managed Http Route Config. /// /// /// Request Path @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual async Task> GetAsyn } /// - /// Get the specified Http Route Config. + /// Get the specified Managed Http Route Config. /// /// /// Request Path @@ -211,7 +211,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -244,7 +244,7 @@ public virtual Response Get(string httpRout } /// - /// List the Http Route Configs in a given managed environment. + /// Get the Managed Http Routes in a given managed environment. /// /// /// Request Path @@ -256,7 +256,7 @@ public virtual Response Get(string httpRout /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual AsyncPageable GetAllAsync(Ca } /// - /// List the Http Route Configs in a given managed environment. + /// Get the Managed Http Routes in a given managed environment. /// /// /// Request Path @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string httpRouteName, Canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string httpRouteName, CancellationToken can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigData.cs index b413d73206a5..29e0fb23d24a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.AppContainers { /// /// A class representing the ContainerAppHttpRouteConfig data model. - /// A set of host names and http request routing rules for a Container App Environment + /// Advanced Ingress routing for path/header based routing for a Container App Environment /// public partial class ContainerAppHttpRouteConfigData : ResourceData { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigResource.cs index 785ce08d6e14..61de514bfd44 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppHttpRouteConfigResource.cs @@ -89,7 +89,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get the specified Http Route Config. + /// Get the specified Managed Http Route Config. /// /// /// Request Path @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetAsyn } /// - /// Get the specified Http Route Config. + /// Get the specified Managed Http Route Config. /// /// /// Request Path @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response Get(CancellationTok } /// - /// Deletes the specified Http Route Config. + /// Deletes the specified Managed Http Route. /// /// /// Request Path @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -198,7 +198,9 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _containerAppHttpRouteConfigHttpRouteConfigRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppContainersArmOperation(_containerAppHttpRouteConfigHttpRouteConfigClientDiagnostics, Pipeline, _containerAppHttpRouteConfigHttpRouteConfigRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerAppHttpRouteConfigHttpRouteConfigRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -211,7 +213,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes the specified Http Route Config. + /// Deletes the specified Managed Http Route. /// /// /// Request Path @@ -223,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -240,7 +242,9 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _containerAppHttpRouteConfigHttpRouteConfigRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppContainersArmOperation(_containerAppHttpRouteConfigHttpRouteConfigClientDiagnostics, Pipeline, _containerAppHttpRouteConfigHttpRouteConfigRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerAppHttpRouteConfigHttpRouteConfigRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -253,7 +257,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Patches a Http Route Config resource. Only patching of tags is supported + /// Patches an http route config resource. Only patching of tags is supported /// /// /// Request Path @@ -265,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -295,7 +299,7 @@ public virtual async Task> UpdateA } /// - /// Patches a Http Route Config resource. Only patching of tags is supported + /// Patches an http route config resource. Only patching of tags is supported /// /// /// Request Path @@ -307,7 +311,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs index 25bf2cffa17e..cf455a76e224 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string job /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string jobName, Cancellatio /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string jobName, Cancellati /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string jobName, CancellationToken cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.Serialization.cs index a856ab8db741..f10b08533bfc 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -51,6 +56,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(RunningState)) + { + writer.WritePropertyName("runningState"u8); + writer.WriteStringValue(RunningState.Value.ToString()); + } if (Optional.IsDefined(EnvironmentId)) { writer.WritePropertyName("environmentId"u8); @@ -109,6 +119,7 @@ internal static ContainerAppJobData DeserializeContainerAppJobData(JsonElement e { return null; } + ContainerAppExtendedLocation extendedLocation = default; ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; @@ -117,6 +128,7 @@ internal static ContainerAppJobData DeserializeContainerAppJobData(JsonElement e ResourceType type = default; SystemData systemData = default; ContainerAppJobProvisioningState? provisioningState = default; + JobRunningState? runningState = default; string environmentId = default; string workloadProfileName = default; ContainerAppJobConfiguration configuration = default; @@ -127,6 +139,15 @@ internal static ContainerAppJobData DeserializeContainerAppJobData(JsonElement e Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ContainerAppExtendedLocation.DeserializeContainerAppExtendedLocation(property.Value, options); + continue; + } if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -197,6 +218,15 @@ internal static ContainerAppJobData DeserializeContainerAppJobData(JsonElement e provisioningState = new ContainerAppJobProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("runningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningState = new JobRunningState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("environmentId"u8)) { environmentId = property0.Value.GetString(); @@ -260,8 +290,10 @@ internal static ContainerAppJobData DeserializeContainerAppJobData(JsonElement e systemData, tags ?? new ChangeTrackingDictionary(), location, + extendedLocation, identity, provisioningState, + runningState, environmentId, workloadProfileName, configuration, @@ -354,6 +386,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtendedLocation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extendedLocation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtendedLocation)) + { + builder.Append(" extendedLocation: "); + BicepSerializationHelpers.AppendChildObject(builder, ExtendedLocation, options, 2, false, " extendedLocation: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); if (hasPropertyOverride) { @@ -416,6 +463,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RunningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" runningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RunningState)) + { + builder.Append(" runningState: "); + builder.AppendLine($"'{RunningState.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentId), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.cs index 40211d2d2de8..3d3defe7a31a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobData.cs @@ -65,8 +65,10 @@ public ContainerAppJobData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. + /// The complex type of the extended location. /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. /// Provisioning state of the Container Apps Job. + /// Current running state of the job. /// Resource ID of environment. /// Workload profile name to pin for container apps job execution. /// Container Apps Job configuration properties. @@ -74,10 +76,12 @@ public ContainerAppJobData(AzureLocation location) : base(location) /// Outbound IP Addresses of a container apps job. /// The endpoint of the eventstream of the container apps job. /// Keeps track of any properties unknown to the library. - internal ContainerAppJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ContainerAppJobProvisioningState? provisioningState, string environmentId, string workloadProfileName, ContainerAppJobConfiguration configuration, ContainerAppJobTemplate template, IReadOnlyList outboundIPAddresses, string eventStreamEndpoint, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerAppJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, ContainerAppJobProvisioningState? provisioningState, JobRunningState? runningState, string environmentId, string workloadProfileName, ContainerAppJobConfiguration configuration, ContainerAppJobTemplate template, IReadOnlyList outboundIPAddresses, string eventStreamEndpoint, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { + ExtendedLocation = extendedLocation; Identity = identity; ProvisioningState = provisioningState; + RunningState = runningState; EnvironmentId = environmentId; WorkloadProfileName = workloadProfileName; Configuration = configuration; @@ -92,12 +96,18 @@ internal ContainerAppJobData() { } + /// The complex type of the extended location. + [WirePath("extendedLocation")] + public ContainerAppExtendedLocation ExtendedLocation { get; set; } /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// Provisioning state of the Container Apps Job. [WirePath("properties.provisioningState")] public ContainerAppJobProvisioningState? ProvisioningState { get; } + /// Current running state of the job. + [WirePath("properties.runningState")] + public JobRunningState? RunningState { get; } /// Resource ID of environment. [WirePath("properties.environmentId")] public string EnvironmentId { get; set; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorCollection.cs index 9585c05d56c5..e59bde066b12 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string detectorName /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string detectorName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string detectorName, CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyCollection.cs index 75641e3439e0..b0935ca5160d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -151,7 +151,7 @@ public virtual Response Get(string apiN /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -194,7 +194,7 @@ public virtual async Task> ExistsAsync(string apiName, Cancellati /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -237,7 +237,7 @@ public virtual Response Exists(string apiName, CancellationToken cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.cs index ed03df95fc42..573bba1accff 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.cs index ed72cef040be..abd1c7545ce2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionCollection.cs index 23ebef538f18..a53dbdf1bd87 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual Response Get(string jobExecutio /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -221,7 +221,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -264,7 +264,7 @@ public virtual async Task> ExistsAsync(string jobExecutionName, C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Response Exists(string jobExecutionName, CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.Serialization.cs index d01d9df19c09..648504999914 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.Serialization.cs @@ -60,6 +60,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("template"u8); writer.WriteObjectValue(Template, options); } + if (Optional.IsDefined(DetailedStatus)) + { + writer.WritePropertyName("detailedStatus"u8); + writer.WriteObjectValue(DetailedStatus, options); + } + if (options.Format != "W" && Optional.IsDefined(Reason)) + { + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } writer.WriteEndObject(); } @@ -91,6 +106,9 @@ internal static ContainerAppJobExecutionData DeserializeContainerAppJobExecution DateTimeOffset? startTime = default; DateTimeOffset? endTime = default; ContainerAppJobExecutionTemplate template = default; + ExecutionStatus detailedStatus = default; + string reason = default; + string message = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -164,6 +182,25 @@ internal static ContainerAppJobExecutionData DeserializeContainerAppJobExecution template = ContainerAppJobExecutionTemplate.DeserializeContainerAppJobExecutionTemplate(property0.Value, options); continue; } + if (property0.NameEquals("detailedStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + detailedStatus = ExecutionStatus.DeserializeExecutionStatus(property0.Value, options); + continue; + } + if (property0.NameEquals("reason"u8)) + { + reason = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("message"u8)) + { + message = property0.Value.GetString(); + continue; + } } continue; } @@ -182,6 +219,9 @@ internal static ContainerAppJobExecutionData DeserializeContainerAppJobExecution startTime, endTime, template, + detailedStatus, + reason, + message, serializedAdditionalRawData); } @@ -313,6 +353,72 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("DetailedStatusReplicas", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" detailedStatus: "); + builder.AppendLine("{"); + builder.AppendLine(" detailedStatus: {"); + builder.Append(" replicas: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(DetailedStatus)) + { + builder.Append(" detailedStatus: "); + BicepSerializationHelpers.AppendChildObject(builder, DetailedStatus, options, 4, false, " detailedStatus: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Reason), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reason: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Reason)) + { + builder.Append(" reason: "); + if (Reason.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Reason}'''"); + } + else + { + builder.AppendLine($"'{Reason}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.cs index a5d30844c2ed..baf9680ec2ba 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionData.cs @@ -65,13 +65,19 @@ internal ContainerAppJobExecutionData() /// Job execution start time. /// Job execution end time. /// Job's execution container. + /// Detailed status of the job execution. + /// Reason for the current condition of job execution. + /// Human readable message indicating details about the current condition of the job execution. /// Keeps track of any properties unknown to the library. - internal ContainerAppJobExecutionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, JobExecutionRunningState? status, DateTimeOffset? startOn, DateTimeOffset? endOn, ContainerAppJobExecutionTemplate template, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ContainerAppJobExecutionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, JobExecutionRunningState? status, DateTimeOffset? startOn, DateTimeOffset? endOn, ContainerAppJobExecutionTemplate template, ExecutionStatus detailedStatus, string reason, string message, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Status = status; StartOn = startOn; EndOn = endOn; Template = template; + DetailedStatus = detailedStatus; + Reason = reason; + Message = message; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -87,5 +93,20 @@ internal ContainerAppJobExecutionData(ResourceIdentifier id, string name, Resour /// Job's execution container. [WirePath("properties.template")] public ContainerAppJobExecutionTemplate Template { get; } + /// Detailed status of the job execution. + internal ExecutionStatus DetailedStatus { get; } + /// Replicas in the execution. + [WirePath("properties.detailedStatus.replicas")] + public IReadOnlyList DetailedStatusReplicas + { + get => DetailedStatus?.Replicas; + } + + /// Reason for the current condition of job execution. + [WirePath("properties.reason")] + public string Reason { get; } + /// Human readable message indicating details about the current condition of the job execution. + [WirePath("properties.message")] + public string Message { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.cs index d4952acf0982..e22476763d0c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -223,7 +223,7 @@ public virtual async Task StopExecutionJobAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs index 9e31ea8bce94..a5e88b720c51 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.cs @@ -111,7 +111,7 @@ public virtual ContainerAppJobDetectorCollection GetContainerAppJobDetectors() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetContaine /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual ContainerAppJobDetectorPropertyCollection GetContainerAppJobDetec /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -249,7 +249,7 @@ public virtual ContainerAppJobExecutionCollection GetContainerAppJobExecutions() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -280,7 +280,7 @@ public virtual async Task> GetContain /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Response GetContainerAppJobExec /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -391,7 +391,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -433,7 +433,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -475,7 +475,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -521,7 +521,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -567,7 +567,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -610,7 +610,7 @@ public virtual async Task> StartAsync /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -653,7 +653,7 @@ public virtual ArmOperation Start(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -695,7 +695,7 @@ public virtual async Task> StopMultipleE /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -737,7 +737,7 @@ public virtual ArmOperation StopMultipleExecutions(Wa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -766,7 +766,7 @@ public virtual AsyncPageable GetSecretsAsync(Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -782,6 +782,174 @@ public virtual Pageable GetSecrets(CancellationToken return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ContainerAppWritableSecret.DeserializeContainerAppWritableSecret(e), _containerAppJobJobsClientDiagnostics, Pipeline, "ContainerAppJobResource.GetSecrets", "value", null, cancellationToken); } + /// + /// Resumes a suspended job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/resume + /// + /// + /// Operation Id + /// Jobs_Resume + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ResumeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Resume"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.ResumeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resumes a suspended job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/resume + /// + /// + /// Operation Id + /// Jobs_Resume + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Resume(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Resume"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Resume(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateResumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Suspends a job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/suspend + /// + /// + /// Operation Id + /// Jobs_Suspend + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> SuspendAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Suspend"); + scope.Start(); + try + { + var response = await _containerAppJobJobsRestClient.SuspendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateSuspendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Suspends a job + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/suspend + /// + /// + /// Operation Id + /// Jobs_Suspend + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppJobJobsClientDiagnostics.CreateScope("ContainerAppJobResource.Suspend"); + scope.Start(); + try + { + var response = _containerAppJobJobsRestClient.Suspend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppJobOperationSource(Client), _containerAppJobJobsClientDiagnostics, Pipeline, _containerAppJobJobsRestClient.CreateSuspendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -795,7 +963,7 @@ public virtual Pageable GetSecrets(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -857,7 +1025,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -919,7 +1087,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -976,7 +1144,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1033,7 +1201,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1093,7 +1261,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationCollection.cs index c01c4d426056..e62766716de2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string configName, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string configName, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationResource.cs index 7afc171457f0..0faca9855d77 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppMaintenanceConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateCollection.cs index 8000cb5f4118..47f4f7034dbf 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string manag /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string managedCertificateN /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string managedCertificateName, Cancellation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.cs index 49a4608f938d..7732725e7797 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(Container /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task> AddT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -479,7 +479,7 @@ public virtual Response AddTag(string ke /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -536,7 +536,7 @@ public virtual async Task> SetT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -593,7 +593,7 @@ public virtual Response SetTags(IDiction /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -653,7 +653,7 @@ public virtual async Task> Remo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateCollection.cs index 428f23e6950d..0e0f4dc399a2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(s /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAl /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string certificateName, Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string certificateName, CancellationToken c /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.cs index 0acd10fb280c..aa5931c8db0f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Updat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -479,7 +479,7 @@ public virtual Response AddTa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -536,7 +536,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -593,7 +593,7 @@ public virtual Response SetTa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -653,7 +653,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCollection.cs index 5a1e4c2365cf..00d07620388d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string envir /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string environmentName, Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string environmentName, CancellationToken c /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentCollection.cs index 04399e44b493..2fa8da379386 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string componentName, Canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string componentName, CancellationToken can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.cs index 831d966aeb92..60901656e8b1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.cs @@ -90,6 +90,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of DaprComponentResiliencyPolicyResources in the ContainerAppManagedEnvironmentDaprComponent. + /// An object representing collection of DaprComponentResiliencyPolicyResources and their operations over a DaprComponentResiliencyPolicyResource. + public virtual DaprComponentResiliencyPolicyCollection GetDaprComponentResiliencyPolicies() + { + return GetCachedClient(client => new DaprComponentResiliencyPolicyCollection(client, Id)); + } + + /// + /// Get a Dapr component resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDaprComponentResiliencyPolicyAsync(string name, CancellationToken cancellationToken = default) + { + return await GetDaprComponentResiliencyPolicies().GetAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Dapr component resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDaprComponentResiliencyPolicy(string name, CancellationToken cancellationToken = default) + { + return GetDaprComponentResiliencyPolicies().Get(name, cancellationToken); + } + /// /// Get a dapr component. /// @@ -103,7 +172,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -143,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +252,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -227,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -271,7 +340,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -319,7 +388,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -367,7 +436,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -396,7 +465,7 @@ public virtual AsyncPageable GetSecretsAsync(Cancellatio /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.Serialization.cs index b52c153f9edf..8a8b3cc0ae21 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.Serialization.cs @@ -82,6 +82,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("defaultDomain"u8); writer.WriteStringValue(DefaultDomain); } + if (options.Format != "W" && Optional.IsDefined(PrivateLinkDefaultDomain)) + { + writer.WritePropertyName("privateLinkDefaultDomain"u8); + writer.WriteStringValue(PrivateLinkDefaultDomain); + } if (options.Format != "W" && Optional.IsDefined(StaticIP)) { writer.WritePropertyName("staticIp"u8); @@ -92,11 +97,31 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("appLogsConfiguration"u8); writer.WriteObjectValue(AppLogsConfiguration, options); } + if (Optional.IsDefined(AppInsightsConfiguration)) + { + writer.WritePropertyName("appInsightsConfiguration"u8); + writer.WriteObjectValue(AppInsightsConfiguration, options); + } + if (Optional.IsDefined(OpenTelemetryConfiguration)) + { + writer.WritePropertyName("openTelemetryConfiguration"u8); + writer.WriteObjectValue(OpenTelemetryConfiguration, options); + } if (Optional.IsDefined(IsZoneRedundant)) { writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsCollectionDefined(AvailabilityZones)) + { + writer.WritePropertyName("availabilityZones"u8); + writer.WriteStartArray(); + foreach (var item in AvailabilityZones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(CustomDomainConfiguration)) { writer.WritePropertyName("customDomainConfiguration"u8); @@ -162,6 +187,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("publicNetworkAccess"u8); writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); } + if (Optional.IsDefined(DiskEncryptionConfiguration)) + { + writer.WritePropertyName("diskEncryptionConfiguration"u8); + writer.WriteObjectValue(DiskEncryptionConfiguration, options); + } writer.WriteEndObject(); } @@ -199,9 +229,13 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage ContainerAppVnetConfiguration vnetConfiguration = default; string deploymentErrors = default; string defaultDomain = default; + string privateLinkDefaultDomain = default; IPAddress staticIP = default; ContainerAppLogsConfiguration appLogsConfiguration = default; + AppInsightsConfiguration appInsightsConfiguration = default; + OpenTelemetryConfiguration openTelemetryConfiguration = default; bool? zoneRedundant = default; + IList availabilityZones = default; ContainerAppCustomDomainConfiguration customDomainConfiguration = default; string eventStreamEndpoint = default; IList workloadProfiles = default; @@ -213,6 +247,7 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage ManagedEnvironmentIngressConfiguration ingressConfiguration = default; IReadOnlyList privateEndpointConnections = default; ContainerAppPublicNetworkAccess? publicNetworkAccess = default; + DiskEncryptionConfiguration diskEncryptionConfiguration = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -321,6 +356,11 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage defaultDomain = property0.Value.GetString(); continue; } + if (property0.NameEquals("privateLinkDefaultDomain"u8)) + { + privateLinkDefaultDomain = property0.Value.GetString(); + continue; + } if (property0.NameEquals("staticIp"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -339,6 +379,24 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage appLogsConfiguration = ContainerAppLogsConfiguration.DeserializeContainerAppLogsConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("appInsightsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appInsightsConfiguration = AppInsightsConfiguration.DeserializeAppInsightsConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("openTelemetryConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openTelemetryConfiguration = OpenTelemetryConfiguration.DeserializeOpenTelemetryConfiguration(property0.Value, options); + continue; + } if (property0.NameEquals("zoneRedundant"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -348,6 +406,20 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage zoneRedundant = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("availabilityZones"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availabilityZones = array; + continue; + } if (property0.NameEquals("customDomainConfiguration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -449,6 +521,15 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage publicNetworkAccess = new ContainerAppPublicNetworkAccess(property0.Value.GetString()); continue; } + if (property0.NameEquals("diskEncryptionConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskEncryptionConfiguration = DiskEncryptionConfiguration.DeserializeDiskEncryptionConfiguration(property0.Value, options); + continue; + } } continue; } @@ -473,9 +554,13 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage vnetConfiguration, deploymentErrors, defaultDomain, + privateLinkDefaultDomain, staticIP, appLogsConfiguration, + appInsightsConfiguration, + openTelemetryConfiguration, zoneRedundant, + availabilityZones ?? new ChangeTrackingList(), customDomainConfiguration, eventStreamEndpoint, workloadProfiles ?? new ChangeTrackingList(), @@ -487,6 +572,7 @@ internal static ContainerAppManagedEnvironmentData DeserializeContainerAppManage ingressConfiguration, privateEndpointConnections ?? new ChangeTrackingList(), publicNetworkAccess, + diskEncryptionConfiguration, serializedAdditionalRawData); } @@ -765,6 +851,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateLinkDefaultDomain), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkDefaultDomain: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateLinkDefaultDomain)) + { + builder.Append(" privateLinkDefaultDomain: "); + if (PrivateLinkDefaultDomain.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrivateLinkDefaultDomain}'''"); + } + else + { + builder.AppendLine($"'{PrivateLinkDefaultDomain}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StaticIP), out propertyOverride); if (hasPropertyOverride) { @@ -795,6 +904,41 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("AppInsightsConnectionString", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appInsightsConfiguration: "); + builder.AppendLine("{"); + builder.AppendLine(" appInsightsConfiguration: {"); + builder.Append(" connectionString: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(AppInsightsConfiguration)) + { + builder.Append(" appInsightsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, AppInsightsConfiguration, options, 4, false, " appInsightsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenTelemetryConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openTelemetryConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OpenTelemetryConfiguration)) + { + builder.Append(" openTelemetryConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, OpenTelemetryConfiguration, options, 4, false, " openTelemetryConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsZoneRedundant), out propertyOverride); if (hasPropertyOverride) { @@ -811,6 +955,42 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailabilityZones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availabilityZones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AvailabilityZones)) + { + if (AvailabilityZones.Any()) + { + builder.Append(" availabilityZones: "); + builder.AppendLine("["); + foreach (var item in AvailabilityZones) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDomainConfiguration), out propertyOverride); if (hasPropertyOverride) { @@ -957,7 +1137,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsEnabled", out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsPeerToPeerEncryptionEnabled", out propertyOverride); if (hasPropertyOverride) { builder.Append(" peerTrafficConfiguration: "); @@ -1032,6 +1212,26 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("DiskEncryptionKeyVaultConfiguration", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" diskEncryptionConfiguration: "); + builder.AppendLine("{"); + builder.AppendLine(" diskEncryptionConfiguration: {"); + builder.Append(" keyVaultConfiguration: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(DiskEncryptionConfiguration)) + { + builder.Append(" diskEncryptionConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, DiskEncryptionConfiguration, options, 4, false, " diskEncryptionConfiguration: "); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs index 98ccac058976..1b62fca095f9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentData.cs @@ -56,6 +56,7 @@ public partial class ContainerAppManagedEnvironmentData : TrackedResourceData /// The location. public ContainerAppManagedEnvironmentData(AzureLocation location) : base(location) { + AvailabilityZones = new ChangeTrackingList(); WorkloadProfiles = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); } @@ -75,9 +76,13 @@ public ContainerAppManagedEnvironmentData(AzureLocation location) : base(locatio /// Vnet configuration for the environment. /// Any errors that occurred during deployment or deployment validation. /// Default Domain Name for the cluster. + /// Private Link Default Domain Name for the environment. /// Static IP of the Environment. /// Cluster configuration which enables the log daemon to export app logs to configured destination. + /// Environment level Application Insights configuration. + /// Environment Open Telemetry configuration. /// Whether or not this Managed Environment is zone-redundant. + /// The list of availability zones to use for managed environment. /// Custom domain configuration for the environment. /// The endpoint of the eventstream of the Environment. /// Workload profiles configured for the Managed Environment. @@ -89,8 +94,9 @@ public ContainerAppManagedEnvironmentData(AzureLocation location) : base(locatio /// Ingress configuration for the Managed Environment. /// Private endpoint connections to the resource. /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. + /// Disk encryption configuration for the Managed Environment. /// Keeps track of any properties unknown to the library. - internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string kind, ManagedServiceIdentity identity, ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, IPAddress staticIP, ContainerAppLogsConfiguration appLogsConfiguration, bool? isZoneRedundant, ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, IList workloadProfiles, KedaConfiguration kedaConfiguration, DaprConfiguration daprConfiguration, string infrastructureResourceGroup, ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication, ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration, ManagedEnvironmentIngressConfiguration ingressConfiguration, IReadOnlyList privateEndpointConnections, ContainerAppPublicNetworkAccess? publicNetworkAccess, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string kind, ManagedServiceIdentity identity, ContainerAppEnvironmentProvisioningState? provisioningState, string daprAIInstrumentationKey, string daprAIConnectionString, ContainerAppVnetConfiguration vnetConfiguration, string deploymentErrors, string defaultDomain, string privateLinkDefaultDomain, IPAddress staticIP, ContainerAppLogsConfiguration appLogsConfiguration, AppInsightsConfiguration appInsightsConfiguration, OpenTelemetryConfiguration openTelemetryConfiguration, bool? isZoneRedundant, IList availabilityZones, ContainerAppCustomDomainConfiguration customDomainConfiguration, string eventStreamEndpoint, IList workloadProfiles, KedaConfiguration kedaConfiguration, DaprConfiguration daprConfiguration, string infrastructureResourceGroup, ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication, ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration, ManagedEnvironmentIngressConfiguration ingressConfiguration, IReadOnlyList privateEndpointConnections, ContainerAppPublicNetworkAccess? publicNetworkAccess, DiskEncryptionConfiguration diskEncryptionConfiguration, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Kind = kind; Identity = identity; @@ -100,9 +106,13 @@ internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, VnetConfiguration = vnetConfiguration; DeploymentErrors = deploymentErrors; DefaultDomain = defaultDomain; + PrivateLinkDefaultDomain = privateLinkDefaultDomain; StaticIP = staticIP; AppLogsConfiguration = appLogsConfiguration; + AppInsightsConfiguration = appInsightsConfiguration; + OpenTelemetryConfiguration = openTelemetryConfiguration; IsZoneRedundant = isZoneRedundant; + AvailabilityZones = availabilityZones; CustomDomainConfiguration = customDomainConfiguration; EventStreamEndpoint = eventStreamEndpoint; WorkloadProfiles = workloadProfiles; @@ -114,6 +124,7 @@ internal ContainerAppManagedEnvironmentData(ResourceIdentifier id, string name, IngressConfiguration = ingressConfiguration; PrivateEndpointConnections = privateEndpointConnections; PublicNetworkAccess = publicNetworkAccess; + DiskEncryptionConfiguration = diskEncryptionConfiguration; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -146,15 +157,39 @@ internal ContainerAppManagedEnvironmentData() /// Default Domain Name for the cluster. [WirePath("properties.defaultDomain")] public string DefaultDomain { get; } + /// Private Link Default Domain Name for the environment. + [WirePath("properties.privateLinkDefaultDomain")] + public string PrivateLinkDefaultDomain { get; } /// Static IP of the Environment. [WirePath("properties.staticIp")] public IPAddress StaticIP { get; } /// Cluster configuration which enables the log daemon to export app logs to configured destination. [WirePath("properties.appLogsConfiguration")] public ContainerAppLogsConfiguration AppLogsConfiguration { get; set; } + /// Environment level Application Insights configuration. + internal AppInsightsConfiguration AppInsightsConfiguration { get; set; } + /// Application Insights connection string. + [WirePath("properties.appInsightsConfiguration.connectionString")] + public string AppInsightsConnectionString + { + get => AppInsightsConfiguration is null ? default : AppInsightsConfiguration.ConnectionString; + set + { + if (AppInsightsConfiguration is null) + AppInsightsConfiguration = new AppInsightsConfiguration(); + AppInsightsConfiguration.ConnectionString = value; + } + } + + /// Environment Open Telemetry configuration. + [WirePath("properties.openTelemetryConfiguration")] + public OpenTelemetryConfiguration OpenTelemetryConfiguration { get; set; } /// Whether or not this Managed Environment is zone-redundant. [WirePath("properties.zoneRedundant")] public bool? IsZoneRedundant { get; set; } + /// The list of availability zones to use for managed environment. + [WirePath("properties.availabilityZones")] + public IList AvailabilityZones { get; } /// Custom domain configuration for the environment. [WirePath("properties.customDomainConfiguration")] public ContainerAppCustomDomainConfiguration CustomDomainConfiguration { get; set; } @@ -204,14 +239,14 @@ public bool? IsMtlsEnabled internal ManagedEnvironmentPropertiesPeerTrafficConfiguration PeerTrafficConfiguration { get; set; } /// Boolean indicating whether the peer traffic encryption is enabled. [WirePath("properties.peerTrafficConfiguration.encryption.enabled")] - public bool? IsEnabled + public bool? IsPeerToPeerEncryptionEnabled { - get => PeerTrafficConfiguration is null ? default : PeerTrafficConfiguration.IsEnabled; + get => PeerTrafficConfiguration is null ? default : PeerTrafficConfiguration.IsPeerToPeerEncryptionEnabled; set { if (PeerTrafficConfiguration is null) PeerTrafficConfiguration = new ManagedEnvironmentPropertiesPeerTrafficConfiguration(); - PeerTrafficConfiguration.IsEnabled = value; + PeerTrafficConfiguration.IsPeerToPeerEncryptionEnabled = value; } } @@ -224,5 +259,19 @@ public bool? IsEnabled /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. [WirePath("properties.publicNetworkAccess")] public ContainerAppPublicNetworkAccess? PublicNetworkAccess { get; set; } + /// Disk encryption configuration for the Managed Environment. + internal DiskEncryptionConfiguration DiskEncryptionConfiguration { get; set; } + /// The Key Vault that contains your key to use for disk encryption. The Key Vault must be in the same region as the Managed Environment. + [WirePath("properties.diskEncryptionConfiguration.keyVaultConfiguration")] + public DiskEncryptionConfigurationKeyVaultConfiguration DiskEncryptionKeyVaultConfiguration + { + get => DiskEncryptionConfiguration is null ? default : DiskEncryptionConfiguration.KeyVaultConfiguration; + set + { + if (DiskEncryptionConfiguration is null) + DiskEncryptionConfiguration = new DiskEncryptionConfiguration(); + DiskEncryptionConfiguration.KeyVaultConfiguration = value; + } + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorCollection.cs index 2ff89d83d12a..af664f917588 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string detectorName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string detectorName, CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.cs index 87bedd8e4478..e0ab00e9d5cf 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs index 26a798d19468..9aead8400a6d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs index aaa040328969..9eeab064e736 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.cs @@ -123,7 +123,7 @@ public virtual ContainerAppManagedEnvironmentCertificateCollection GetContainerA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -172,149 +172,149 @@ public virtual Response GetCo return GetContainerAppManagedEnvironmentCertificates().Get(certificateName, cancellationToken); } - /// Gets a collection of ContainerAppManagedEnvironmentDaprComponentResources in the ContainerAppManagedEnvironment. - /// An object representing collection of ContainerAppManagedEnvironmentDaprComponentResources and their operations over a ContainerAppManagedEnvironmentDaprComponentResource. - public virtual ContainerAppManagedEnvironmentDaprComponentCollection GetContainerAppManagedEnvironmentDaprComponents() + /// Gets a collection of ContainerAppManagedEnvironmentDetectorResources in the ContainerAppManagedEnvironment. + /// An object representing collection of ContainerAppManagedEnvironmentDetectorResources and their operations over a ContainerAppManagedEnvironmentDetectorResource. + public virtual ContainerAppManagedEnvironmentDetectorCollection GetContainerAppManagedEnvironmentDetectors() { - return GetCachedClient(client => new ContainerAppManagedEnvironmentDaprComponentCollection(client, Id)); + return GetCachedClient(client => new ContainerAppManagedEnvironmentDetectorCollection(client, Id)); } /// - /// Get a dapr component. + /// Get the diagnostics data for a Managed Environment used to host container apps. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName} /// /// /// Operation Id - /// DaprComponents_Get + /// ManagedEnvironmentDiagnostics_GetDetector /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Dapr Component. + /// Name of the Managed Environment detector. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetContainerAppManagedEnvironmentDaprComponentAsync(string componentName, CancellationToken cancellationToken = default) + public virtual async Task> GetContainerAppManagedEnvironmentDetectorAsync(string detectorName, CancellationToken cancellationToken = default) { - return await GetContainerAppManagedEnvironmentDaprComponents().GetAsync(componentName, cancellationToken).ConfigureAwait(false); + return await GetContainerAppManagedEnvironmentDetectors().GetAsync(detectorName, cancellationToken).ConfigureAwait(false); } /// - /// Get a dapr component. + /// Get the diagnostics data for a Managed Environment used to host container apps. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName} /// /// /// Operation Id - /// DaprComponents_Get + /// ManagedEnvironmentDiagnostics_GetDetector /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Dapr Component. + /// Name of the Managed Environment detector. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetContainerAppManagedEnvironmentDaprComponent(string componentName, CancellationToken cancellationToken = default) + public virtual Response GetContainerAppManagedEnvironmentDetector(string detectorName, CancellationToken cancellationToken = default) { - return GetContainerAppManagedEnvironmentDaprComponents().Get(componentName, cancellationToken); + return GetContainerAppManagedEnvironmentDetectors().Get(detectorName, cancellationToken); } - /// Gets a collection of ContainerAppManagedEnvironmentDetectorResources in the ContainerAppManagedEnvironment. - /// An object representing collection of ContainerAppManagedEnvironmentDetectorResources and their operations over a ContainerAppManagedEnvironmentDetectorResource. - public virtual ContainerAppManagedEnvironmentDetectorCollection GetContainerAppManagedEnvironmentDetectors() + /// Gets an object representing a ContainerAppManagedEnvironmentDetectorResourcePropertyResource along with the instance operations that can be performed on it in the ContainerAppManagedEnvironment. + /// Returns a object. + public virtual ContainerAppManagedEnvironmentDetectorResourcePropertyResource GetContainerAppManagedEnvironmentDetectorResourceProperty() { - return GetCachedClient(client => new ContainerAppManagedEnvironmentDetectorCollection(client, Id)); + return new ContainerAppManagedEnvironmentDetectorResourcePropertyResource(Client, Id.AppendChildResource("detectorProperties", "rootApi")); + } + + /// Gets a collection of DotNetComponentResources in the ContainerAppManagedEnvironment. + /// An object representing collection of DotNetComponentResources and their operations over a DotNetComponentResource. + public virtual DotNetComponentCollection GetDotNetComponents() + { + return GetCachedClient(client => new DotNetComponentCollection(client, Id)); } /// - /// Get the diagnostics data for a Managed Environment used to host container apps. + /// Get a .NET Component. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} /// /// /// Operation Id - /// ManagedEnvironmentDiagnostics_GetDetector + /// DotNetComponents_Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Managed Environment detector. + /// Name of the .NET Component. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetContainerAppManagedEnvironmentDetectorAsync(string detectorName, CancellationToken cancellationToken = default) + public virtual async Task> GetDotNetComponentAsync(string name, CancellationToken cancellationToken = default) { - return await GetContainerAppManagedEnvironmentDetectors().GetAsync(detectorName, cancellationToken).ConfigureAwait(false); + return await GetDotNetComponents().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// - /// Get the diagnostics data for a Managed Environment used to host container apps. + /// Get a .NET Component. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} /// /// /// Operation Id - /// ManagedEnvironmentDiagnostics_GetDetector + /// DotNetComponents_Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Managed Environment detector. + /// Name of the .NET Component. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetContainerAppManagedEnvironmentDetector(string detectorName, CancellationToken cancellationToken = default) + public virtual Response GetDotNetComponent(string name, CancellationToken cancellationToken = default) { - return GetContainerAppManagedEnvironmentDetectors().Get(detectorName, cancellationToken); - } - - /// Gets an object representing a ContainerAppManagedEnvironmentDetectorResourcePropertyResource along with the instance operations that can be performed on it in the ContainerAppManagedEnvironment. - /// Returns a object. - public virtual ContainerAppManagedEnvironmentDetectorResourcePropertyResource GetContainerAppManagedEnvironmentDetectorResourceProperty() - { - return new ContainerAppManagedEnvironmentDetectorResourcePropertyResource(Client, Id.AppendChildResource("detectorProperties", "rootApi")); + return GetDotNetComponents().Get(name, cancellationToken); } /// Gets a collection of JavaComponentResources in the ContainerAppManagedEnvironment. @@ -337,7 +337,7 @@ public virtual JavaComponentCollection GetJavaComponents() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> GetJavaComponentAsync /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -406,7 +406,7 @@ public virtual ContainerAppManagedCertificateCollection GetContainerAppManagedCe /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -437,7 +437,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -475,7 +475,7 @@ public virtual ContainerAppPrivateEndpointConnectionCollection GetContainerAppPr /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -506,7 +506,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -524,6 +524,144 @@ public virtual Response GetContai return GetContainerAppPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); } + /// Gets a collection of ContainerAppManagedEnvironmentDaprComponentResources in the ContainerAppManagedEnvironment. + /// An object representing collection of ContainerAppManagedEnvironmentDaprComponentResources and their operations over a ContainerAppManagedEnvironmentDaprComponentResource. + public virtual ContainerAppManagedEnvironmentDaprComponentCollection GetContainerAppManagedEnvironmentDaprComponents() + { + return GetCachedClient(client => new ContainerAppManagedEnvironmentDaprComponentCollection(client, Id)); + } + + /// + /// Get a dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName} + /// + /// + /// Operation Id + /// DaprComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetContainerAppManagedEnvironmentDaprComponentAsync(string componentName, CancellationToken cancellationToken = default) + { + return await GetContainerAppManagedEnvironmentDaprComponents().GetAsync(componentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName} + /// + /// + /// Operation Id + /// DaprComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetContainerAppManagedEnvironmentDaprComponent(string componentName, CancellationToken cancellationToken = default) + { + return GetContainerAppManagedEnvironmentDaprComponents().Get(componentName, cancellationToken); + } + + /// Gets a collection of DaprSubscriptionResources in the ContainerAppManagedEnvironment. + /// An object representing collection of DaprSubscriptionResources and their operations over a DaprSubscriptionResource. + public virtual DaprSubscriptionCollection GetDaprSubscriptions() + { + return GetCachedClient(client => new DaprSubscriptionCollection(client, Id)); + } + + /// + /// Get a dapr subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDaprSubscriptionAsync(string name, CancellationToken cancellationToken = default) + { + return await GetDaprSubscriptions().GetAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a dapr subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDaprSubscription(string name, CancellationToken cancellationToken = default) + { + return GetDaprSubscriptions().Get(name, cancellationToken); + } + /// Gets a collection of ContainerAppHttpRouteConfigResources in the ContainerAppManagedEnvironment. /// An object representing collection of ContainerAppHttpRouteConfigResources and their operations over a ContainerAppHttpRouteConfigResource. public virtual ContainerAppHttpRouteConfigCollection GetContainerAppHttpRouteConfigs() @@ -532,7 +670,7 @@ public virtual ContainerAppHttpRouteConfigCollection GetContainerAppHttpRouteCon } /// - /// Get the specified Http Route Config. + /// Get the specified Managed Http Route Config. /// /// /// Request Path @@ -544,7 +682,7 @@ public virtual ContainerAppHttpRouteConfigCollection GetContainerAppHttpRouteCon /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -563,7 +701,7 @@ public virtual async Task> GetCont } /// - /// Get the specified Http Route Config. + /// Get the specified Managed Http Route Config. /// /// /// Request Path @@ -575,7 +713,7 @@ public virtual async Task> GetCont /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -613,7 +751,7 @@ public virtual ContainerAppMaintenanceConfigurationCollection GetContainerAppMai /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -644,7 +782,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -682,7 +820,7 @@ public virtual ContainerAppManagedEnvironmentStorageCollection GetContainerAppMa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -713,7 +851,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -744,7 +882,7 @@ public virtual Response GetContai /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -784,7 +922,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -824,7 +962,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -866,7 +1004,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -908,7 +1046,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -954,7 +1092,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1000,7 +1138,7 @@ public virtual ArmOperation Update(WaitU /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1038,7 +1176,7 @@ public virtual async Task> GetAuthTok /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1076,7 +1214,7 @@ public virtual Response GetAuthToken(Cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1106,7 +1244,7 @@ public virtual AsyncPageable GetWorkloadProfil /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1136,7 +1274,7 @@ public virtual Pageable GetWorkloadProfileStat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1174,7 +1312,7 @@ public virtual async Task> CheckCon /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1212,7 +1350,7 @@ public virtual Response CheckContainerAppNam /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1238,7 +1376,7 @@ public virtual AsyncPageable GetManagedEnvironmentPriva /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1264,7 +1402,7 @@ public virtual Pageable GetManagedEnvironmentPrivateLin /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1290,7 +1428,7 @@ public virtual AsyncPageable GetManagedEnvironmentUsagesAsync /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1316,7 +1454,7 @@ public virtual Pageable GetManagedEnvironmentUsages(Cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1378,7 +1516,7 @@ public virtual async Task> AddT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1440,7 +1578,7 @@ public virtual Response AddTag(string ke /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1497,7 +1635,7 @@ public virtual async Task> SetT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1554,7 +1692,7 @@ public virtual Response SetTags(IDiction /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1614,7 +1752,7 @@ public virtual async Task> Remo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageCollection.cs index 4ea781fa23a6..1fa50e8f5899 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string storageName, Cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string storageName, CancellationToken cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.cs index b68bd005de8f..3cf98ba2e07e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionCollection.cs index 91b2af355033..4d5b44e79627 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionResource.cs index 3c33de8cc0a4..55466b7dc4d4 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaCollection.cs index 8a6f899e3a17..17ee47811e3c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string replicaName, Can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string replicaName, Cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string replicaName, CancellationToken cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.cs index d2858a7244ca..4e00366766f0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs index e9abe065cd4f..9aa07d044086 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.cs @@ -91,6 +91,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of AppResiliencyResources in the ContainerApp. + /// An object representing collection of AppResiliencyResources and their operations over a AppResiliencyResource. + public virtual AppResiliencyCollection GetAppResiliencies() + { + return GetCachedClient(client => new AppResiliencyCollection(client, Id)); + } + + /// + /// Get container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAppResiliencyAsync(string name, CancellationToken cancellationToken = default) + { + return await GetAppResiliencies().GetAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get container app resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// AppResiliency_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the resiliency policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAppResiliency(string name, CancellationToken cancellationToken = default) + { + return GetAppResiliencies().Get(name, cancellationToken); + } + /// Gets a collection of ContainerAppAuthConfigResources in the ContainerApp. /// An object representing collection of ContainerAppAuthConfigResources and their operations over a ContainerAppAuthConfigResource. public virtual ContainerAppAuthConfigCollection GetContainerAppAuthConfigs() @@ -111,7 +180,7 @@ public virtual ContainerAppAuthConfigCollection GetContainerAppAuthConfigs() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -142,7 +211,7 @@ public virtual async Task> GetContainer /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -167,6 +236,213 @@ public virtual ContainerAppDetectorPropertyResource GetContainerAppDetectorPrope return new ContainerAppDetectorPropertyResource(Client, Id.AppendChildResource("detectorProperties", "rootApi")); } + /// Gets a collection of ContainerAppsBuildResources in the ContainerApp. + /// An object representing collection of ContainerAppsBuildResources and their operations over a ContainerAppsBuildResource. + public virtual ContainerAppsBuildResourceCollection GetContainerAppsBuildResources() + { + return GetCachedClient(client => new ContainerAppsBuildResourceCollection(client, Id)); + } + + /// + /// Get a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetContainerAppsBuildResourceAsync(string buildName, CancellationToken cancellationToken = default) + { + return await GetContainerAppsBuildResources().GetAsync(buildName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetContainerAppsBuildResource(string buildName, CancellationToken cancellationToken = default) + { + return GetContainerAppsBuildResources().Get(buildName, cancellationToken); + } + + /// Gets a collection of LabelHistoryResources in the ContainerApp. + /// An object representing collection of LabelHistoryResources and their operations over a LabelHistoryResource. + public virtual LabelHistoryCollection GetLabelHistories() + { + return GetCachedClient(client => new LabelHistoryCollection(client, Id)); + } + + /// + /// Get the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetLabelHistoryAsync(string labelName, CancellationToken cancellationToken = default) + { + return await GetLabelHistories().GetAsync(labelName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetLabelHistory(string labelName, CancellationToken cancellationToken = default) + { + return GetLabelHistories().Get(labelName, cancellationToken); + } + + /// Gets a collection of ContainerAppsPatchResources in the ContainerApp. + /// An object representing collection of ContainerAppsPatchResources and their operations over a ContainerAppsPatchResource. + public virtual ContainerAppsPatchResourceCollection GetContainerAppsPatchResources() + { + return GetCachedClient(client => new ContainerAppsPatchResourceCollection(client, Id)); + } + + /// + /// Get details for specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetContainerAppsPatchResourceAsync(string patchName, CancellationToken cancellationToken = default) + { + return await GetContainerAppsPatchResources().GetAsync(patchName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get details for specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetContainerAppsPatchResource(string patchName, CancellationToken cancellationToken = default) + { + return GetContainerAppsPatchResources().Get(patchName, cancellationToken); + } + /// Gets a collection of ContainerAppRevisionResources in the ContainerApp. /// An object representing collection of ContainerAppRevisionResources and their operations over a ContainerAppRevisionResource. public virtual ContainerAppRevisionCollection GetContainerAppRevisions() @@ -187,7 +463,7 @@ public virtual ContainerAppRevisionCollection GetContainerAppRevisions() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -218,7 +494,7 @@ public virtual async Task> GetContainerAp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -256,7 +532,7 @@ public virtual ContainerAppDetectorPropertyRevisionCollection GetContainerAppDet /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -287,7 +563,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -325,7 +601,7 @@ public virtual ContainerAppDetectorCollection GetContainerAppDetectors() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -356,7 +632,7 @@ public virtual async Task> GetContainerAp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -374,142 +650,142 @@ public virtual Response GetContainerAppDetector(st return GetContainerAppDetectors().Get(detectorName, cancellationToken); } - /// Gets a collection of ContainerAppSourceControlResources in the ContainerApp. - /// An object representing collection of ContainerAppSourceControlResources and their operations over a ContainerAppSourceControlResource. - public virtual ContainerAppSourceControlCollection GetContainerAppSourceControls() + /// Gets a collection of LogicAppResources in the ContainerApp. + /// An object representing collection of LogicAppResources and their operations over a LogicAppResource. + public virtual LogicAppCollection GetLogicApps() { - return GetCachedClient(client => new ContainerAppSourceControlCollection(client, Id)); + return GetCachedClient(client => new LogicAppCollection(client, Id)); } /// - /// Get a SourceControl of a Container App. + /// Gets a logic app extension resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName} /// /// /// Operation Id - /// ContainerAppsSourceControls_Get + /// LogicApps_Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Container App SourceControl. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetContainerAppSourceControlAsync(string sourceControlName, CancellationToken cancellationToken = default) + public virtual async Task> GetLogicAppAsync(string logicAppName, CancellationToken cancellationToken = default) { - return await GetContainerAppSourceControls().GetAsync(sourceControlName, cancellationToken).ConfigureAwait(false); + return await GetLogicApps().GetAsync(logicAppName, cancellationToken).ConfigureAwait(false); } /// - /// Get a SourceControl of a Container App. + /// Gets a logic app extension resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName} /// /// /// Operation Id - /// ContainerAppsSourceControls_Get + /// LogicApps_Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Container App SourceControl. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetContainerAppSourceControl(string sourceControlName, CancellationToken cancellationToken = default) + public virtual Response GetLogicApp(string logicAppName, CancellationToken cancellationToken = default) { - return GetContainerAppSourceControls().Get(sourceControlName, cancellationToken); + return GetLogicApps().Get(logicAppName, cancellationToken); } - /// Gets a collection of LogicAppResources in the ContainerApp. - /// An object representing collection of LogicAppResources and their operations over a LogicAppResource. - public virtual LogicAppCollection GetLogicApps() + /// Gets a collection of ContainerAppSourceControlResources in the ContainerApp. + /// An object representing collection of ContainerAppSourceControlResources and their operations over a ContainerAppSourceControlResource. + public virtual ContainerAppSourceControlCollection GetContainerAppSourceControls() { - return GetCachedClient(client => new LogicAppCollection(client, Id)); + return GetCachedClient(client => new ContainerAppSourceControlCollection(client, Id)); } /// - /// Gets a logic app extension resource. + /// Get a SourceControl of a Container App. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName} /// /// /// Operation Id - /// LogicApps_Get + /// ContainerAppsSourceControls_Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Logic App. + /// Name of the Container App SourceControl. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetLogicAppAsync(string logicAppName, CancellationToken cancellationToken = default) + public virtual async Task> GetContainerAppSourceControlAsync(string sourceControlName, CancellationToken cancellationToken = default) { - return await GetLogicApps().GetAsync(logicAppName, cancellationToken).ConfigureAwait(false); + return await GetContainerAppSourceControls().GetAsync(sourceControlName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a logic app extension resource. + /// Get a SourceControl of a Container App. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName} /// /// /// Operation Id - /// LogicApps_Get + /// ContainerAppsSourceControls_Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource - /// + /// /// /// /// - /// Name of the Logic App. + /// Name of the Container App SourceControl. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetLogicApp(string logicAppName, CancellationToken cancellationToken = default) + public virtual Response GetContainerAppSourceControl(string sourceControlName, CancellationToken cancellationToken = default) { - return GetLogicApps().Get(logicAppName, cancellationToken); + return GetContainerAppSourceControls().Get(sourceControlName, cancellationToken); } /// @@ -525,7 +801,7 @@ public virtual Response GetLogicApp(string logicAppName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -565,7 +841,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -605,7 +881,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -647,7 +923,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -689,7 +965,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -735,7 +1011,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -781,7 +1057,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Co /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -820,7 +1096,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -859,7 +1135,7 @@ public virtual Response GetCustomHostN /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -888,7 +1164,7 @@ public virtual AsyncPageable GetSecretsAsync(CancellationTok /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -917,7 +1193,7 @@ public virtual Pageable GetSecrets(CancellationToken cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -955,7 +1231,7 @@ public virtual async Task> GetAuthTokenAsync(Can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -993,7 +1269,7 @@ public virtual Response GetAuthToken(CancellationToken ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1035,7 +1311,7 @@ public virtual async Task> StartAsync(WaitUnt /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1077,7 +1353,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1119,7 +1395,7 @@ public virtual async Task> StopAsync(WaitUnti /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1161,7 +1437,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, Canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1223,7 +1499,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1285,7 +1561,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1342,7 +1618,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1399,7 +1675,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1459,7 +1735,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionCollection.cs index 2aa2af371589..0dd8560386d8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string revisionName, C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string revisionName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string revisionName, CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.Serialization.cs index a67a22ec30df..a9caadcbfd45 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -75,6 +76,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("trafficWeight"u8); writer.WriteNumberValue(TrafficWeight.Value); } + if (options.Format != "W" && Optional.IsCollectionDefined(Labels)) + { + writer.WritePropertyName("labels"u8); + writer.WriteStartArray(); + foreach (var item in Labels) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningError)) { writer.WritePropertyName("provisioningError"u8); @@ -129,6 +140,7 @@ internal static ContainerAppRevisionData DeserializeContainerAppRevisionData(Jso bool? active = default; int? replicas = default; int? trafficWeight = default; + IReadOnlyList labels = default; string provisioningError = default; ContainerAppRevisionHealthState? healthState = default; ContainerAppRevisionProvisioningState? provisioningState = default; @@ -229,6 +241,20 @@ internal static ContainerAppRevisionData DeserializeContainerAppRevisionData(Jso trafficWeight = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("labels"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + labels = array; + continue; + } if (property0.NameEquals("provisioningError"u8)) { provisioningError = property0.Value.GetString(); @@ -282,6 +308,7 @@ internal static ContainerAppRevisionData DeserializeContainerAppRevisionData(Jso active, replicas, trafficWeight, + labels ?? new ChangeTrackingList(), provisioningError, healthState, provisioningState, @@ -471,6 +498,42 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Labels), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" labels: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Labels)) + { + if (Labels.Any()) + { + builder.Append(" labels: "); + builder.AppendLine("["); + foreach (var item in Labels) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningError), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs index 9cf0c8c6b17a..f7154d0406f3 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionData.cs @@ -54,6 +54,7 @@ public partial class ContainerAppRevisionData : ResourceData /// Initializes a new instance of . public ContainerAppRevisionData() { + Labels = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -75,12 +76,13 @@ public ContainerAppRevisionData() /// Boolean describing if the Revision is Active. /// Number of pods currently running for this revision. /// Traffic weight assigned to this revision. + /// List of labels assigned to this revision. /// Optional Field - Platform Error Message. /// Current health State of the revision. /// Current provisioning State of the revision. /// Current running state of the revision. /// Keeps track of any properties unknown to the library. - internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, DateTimeOffset? lastActiveOn, string fqdn, ContainerAppTemplate template, bool? isActive, int? replicas, int? trafficWeight, string provisioningError, ContainerAppRevisionHealthState? healthState, ContainerAppRevisionProvisioningState? provisioningState, RevisionRunningState? runningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, DateTimeOffset? lastActiveOn, string fqdn, ContainerAppTemplate template, bool? isActive, int? replicas, int? trafficWeight, IReadOnlyList labels, string provisioningError, ContainerAppRevisionHealthState? healthState, ContainerAppRevisionProvisioningState? provisioningState, RevisionRunningState? runningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { CreatedOn = createdOn; LastActiveOn = lastActiveOn; @@ -89,6 +91,7 @@ internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceTy IsActive = isActive; Replicas = replicas; TrafficWeight = trafficWeight; + Labels = labels; ProvisioningError = provisioningError; HealthState = healthState; ProvisioningState = provisioningState; @@ -124,6 +127,9 @@ internal ContainerAppRevisionData(ResourceIdentifier id, string name, ResourceTy /// Traffic weight assigned to this revision. [WirePath("properties.trafficWeight")] public int? TrafficWeight { get; } + /// List of labels assigned to this revision. + [WirePath("properties.labels")] + public IReadOnlyList Labels { get; } /// Optional Field - Platform Error Message. [WirePath("properties.provisioningError")] public string ProvisioningError { get; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.cs index b78074ad2b60..b517200ec46f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.cs @@ -35,6 +35,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _containerAppRevisionContainerAppsRevisionsClientDiagnostics; private readonly ContainerAppsRevisionsRestOperations _containerAppRevisionContainerAppsRevisionsRestClient; + private readonly ClientDiagnostics _functionsExtensionClientDiagnostics; + private readonly FunctionsExtensionRestOperations _functionsExtensionRestClient; private readonly ContainerAppRevisionData _data; /// Gets the resource type for the operations. @@ -62,6 +64,8 @@ internal ContainerAppRevisionResource(ArmClient client, ResourceIdentifier id) : _containerAppRevisionContainerAppsRevisionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string containerAppRevisionContainerAppsRevisionsApiVersion); _containerAppRevisionContainerAppsRevisionsRestClient = new ContainerAppsRevisionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppRevisionContainerAppsRevisionsApiVersion); + _functionsExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _functionsExtensionRestClient = new FunctionsExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -108,7 +112,7 @@ public virtual ContainerAppReplicaCollection GetContainerAppReplicas() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -139,7 +143,7 @@ public virtual async Task> GetContainerApp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -170,7 +174,7 @@ public virtual Response GetContainerAppReplica(stri /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -210,7 +214,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -250,7 +254,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -288,7 +292,7 @@ public virtual async Task ActivateRevisionAsync(CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -326,7 +330,7 @@ public virtual Response ActivateRevision(CancellationToken cancellationToken = d /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -364,7 +368,7 @@ public virtual async Task DeactivateRevisionAsync(CancellationToken ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -402,7 +406,7 @@ public virtual Response DeactivateRevision(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -440,7 +444,7 @@ public virtual async Task RestartRevisionAsync(CancellationToken cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -464,5 +468,83 @@ public virtual Response RestartRevision(CancellationToken cancellationToken = de throw; } } + + /// + /// Proxies a Functions host call to the function app backed by the container app. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke + /// + /// + /// Operation Id + /// FunctionsExtension_InvokeFunctionsHost + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// + /// Name of the Function App, the extension resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> InvokeFunctionsHostFunctionsExtensionAsync(string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var scope = _functionsExtensionClientDiagnostics.CreateScope("ContainerAppRevisionResource.InvokeFunctionsHostFunctionsExtension"); + scope.Start(); + try + { + var response = await _functionsExtensionRestClient.InvokeFunctionsHostAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, functionAppName, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Proxies a Functions host call to the function app backed by the container app. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke + /// + /// + /// Operation Id + /// FunctionsExtension_InvokeFunctionsHost + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// + /// Name of the Function App, the extension resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response InvokeFunctionsHostFunctionsExtension(string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var scope = _functionsExtensionClientDiagnostics.CreateScope("ContainerAppRevisionResource.InvokeFunctionsHostFunctionsExtension"); + scope.Start(); + try + { + var response = _functionsExtensionRestClient.InvokeFunctionsHost(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, functionAppName, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlCollection.cs index e3543c774869..a7c0c812f01e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -75,10 +75,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the Container App SourceControl. /// Properties used to create a Container App SourceControl. + /// Github personal access token used for SourceControl. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sourceControlName, ContainerAppSourceControlData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sourceControlName, ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceControlName, nameof(sourceControlName)); Argument.AssertNotNull(data, nameof(data)); @@ -87,8 +88,8 @@ public virtual async Task> Creat scope.Start(); try { - var response = await _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data, cancellationToken).ConfigureAwait(false); - var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data).Request, response, OperationFinalStateVia.Location); + var response = await _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data, xMsGitHubAuxiliary, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data, xMsGitHubAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -124,10 +125,11 @@ public virtual async Task> Creat /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the Container App SourceControl. /// Properties used to create a Container App SourceControl. + /// Github personal access token used for SourceControl. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sourceControlName, ContainerAppSourceControlData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sourceControlName, ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(sourceControlName, nameof(sourceControlName)); Argument.AssertNotNull(data, nameof(data)); @@ -136,8 +138,8 @@ public virtual ArmOperation CreateOrUpdate(Wa scope.Start(); try { - var response = _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data, cancellationToken); - var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data).Request, response, OperationFinalStateVia.Location); + var response = _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data, xMsGitHubAuxiliary, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sourceControlName, data, xMsGitHubAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -207,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -252,7 +254,7 @@ public virtual Response Get(string sourceCont /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -282,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -312,7 +314,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +357,7 @@ public virtual async Task> ExistsAsync(string sourceControlName, /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -398,7 +400,7 @@ public virtual Response Exists(string sourceControlName, CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -443,7 +445,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.cs index 8df795ebce25..a0a750564b5e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -190,15 +190,18 @@ public virtual Response Get(CancellationToken /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Github personal access token used for SourceControl. + /// Ignore Workflow Deletion Failure. + /// Delete workflow. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = null, bool? deleteWorkflow = null, CancellationToken cancellationToken = default) { using var scope = _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics.CreateScope("ContainerAppSourceControlResource.Delete"); scope.Start(); try { - var response = await _containerAppSourceControlContainerAppsSourceControlsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new AppContainersArmOperation(_containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _containerAppSourceControlContainerAppsSourceControlsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xMsGitHubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xMsGitHubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -223,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -232,15 +235,18 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Github personal access token used for SourceControl. + /// Ignore Workflow Deletion Failure. + /// Delete workflow. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = null, bool? deleteWorkflow = null, CancellationToken cancellationToken = default) { using var scope = _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics.CreateScope("ContainerAppSourceControlResource.Delete"); scope.Start(); try { - var response = _containerAppSourceControlContainerAppsSourceControlsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new AppContainersArmOperation(_containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _containerAppSourceControlContainerAppsSourceControlsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xMsGitHubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow, cancellationToken); + var operation = new AppContainersArmOperation(_containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xMsGitHubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -265,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -275,9 +281,10 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Properties used to create a Container App SourceControl. + /// Github personal access token used for SourceControl. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerAppSourceControlData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -285,8 +292,8 @@ public virtual async Task> Updat scope.Start(); try { - var response = await _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsGitHubAuxiliary, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsGitHubAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -311,7 +318,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -321,9 +328,10 @@ public virtual async Task> Updat /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Properties used to create a Container App SourceControl. + /// Github personal access token used for SourceControl. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerAppSourceControlData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -331,8 +339,8 @@ public virtual ArmOperation Update(WaitUntil scope.Start(); try { - var response = _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsGitHubAuxiliary, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppSourceControlOperationSource(Client), _containerAppSourceControlContainerAppsSourceControlsClientDiagnostics, Pipeline, _containerAppSourceControlContainerAppsSourceControlsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsGitHubAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResource.Serialization.cs new file mode 100644 index 000000000000..b1bc19c41e41 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class ContainerAppsBuildResource : IJsonModel + { + private static ContainerAppsBuildResourceData s_dataDeserializationInstance; + private static ContainerAppsBuildResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ContainerAppsBuildResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + ContainerAppsBuildResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResource.cs new file mode 100644 index 000000000000..f380aa936ccf --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResource.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a ContainerAppsBuildResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetContainerAppsBuildResource method. + /// Otherwise you can get one from its parent resource using the GetContainerAppsBuildResource method. + /// + public partial class ContainerAppsBuildResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The containerAppName. + /// The buildName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string buildName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics; + private readonly ContainerAppsBuildsRestOperations _containerAppsBuildResourceContainerAppsBuildsRestClient; + private readonly ContainerAppsBuildResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/containerApps/builds"; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppsBuildResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ContainerAppsBuildResource(ArmClient client, ContainerAppsBuildResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ContainerAppsBuildResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerAppsBuildResourceContainerAppsBuildsApiVersion); + _containerAppsBuildResourceContainerAppsBuildsRestClient = new ContainerAppsBuildsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppsBuildResourceContainerAppsBuildsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ContainerAppsBuildResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResource.Get"); + scope.Start(); + try + { + var response = await _containerAppsBuildResourceContainerAppsBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResource.Get"); + scope.Start(); + try + { + var response = _containerAppsBuildResourceContainerAppsBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResource.Delete"); + scope.Start(); + try + { + var response = await _containerAppsBuildResourceContainerAppsBuildsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_containerAppsBuildResourceContainerAppsBuildsClientDiagnostics, Pipeline, _containerAppsBuildResourceContainerAppsBuildsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResource.Delete"); + scope.Start(); + try + { + var response = _containerAppsBuildResourceContainerAppsBuildsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(_containerAppsBuildResourceContainerAppsBuildsClientDiagnostics, Pipeline, _containerAppsBuildResourceContainerAppsBuildsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceCollection.cs new file mode 100644 index 000000000000..09d8cf17063c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceCollection.cs @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetContainerAppsBuildResources method from an instance of . + /// + public partial class ContainerAppsBuildResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics; + private readonly ContainerAppsBuildsRestOperations _containerAppsBuildResourceContainerAppsBuildsRestClient; + private readonly ClientDiagnostics _containerAppsBuildResourceContainerAppsBuildsByContainerAppClientDiagnostics; + private readonly ContainerAppsBuildsByContainerAppRestOperations _containerAppsBuildResourceContainerAppsBuildsByContainerAppRestClient; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppsBuildResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ContainerAppsBuildResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppsBuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerAppsBuildResource.ResourceType, out string containerAppsBuildResourceContainerAppsBuildsApiVersion); + _containerAppsBuildResourceContainerAppsBuildsRestClient = new ContainerAppsBuildsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppsBuildResourceContainerAppsBuildsApiVersion); + _containerAppsBuildResourceContainerAppsBuildsByContainerAppClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppsBuildResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerAppsBuildResource.ResourceType, out string containerAppsBuildResourceContainerAppsBuildsByContainerAppApiVersion); + _containerAppsBuildResourceContainerAppsBuildsByContainerAppRestClient = new ContainerAppsBuildsByContainerAppRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppsBuildResourceContainerAppsBuildsByContainerAppApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppResource.ResourceType), nameof(id)); + } + + /// + /// Get a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResourceCollection.Get"); + scope.Start(); + try + { + var response = await _containerAppsBuildResourceContainerAppsBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Container Apps Build resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResourceCollection.Get"); + scope.Start(); + try + { + var response = _containerAppsBuildResourceContainerAppsBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Container Apps Build resources by Container App + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds + /// + /// + /// Operation Id + /// ContainerAppsBuildsByContainerApp_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppsBuildResourceContainerAppsBuildsByContainerAppRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppsBuildResourceContainerAppsBuildsByContainerAppRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppsBuildResource(Client, ContainerAppsBuildResourceData.DeserializeContainerAppsBuildResourceData(e)), _containerAppsBuildResourceContainerAppsBuildsByContainerAppClientDiagnostics, Pipeline, "ContainerAppsBuildResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Container Apps Build resources by Container App + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds + /// + /// + /// Operation Id + /// ContainerAppsBuildsByContainerApp_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppsBuildResourceContainerAppsBuildsByContainerAppRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppsBuildResourceContainerAppsBuildsByContainerAppRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppsBuildResource(Client, ContainerAppsBuildResourceData.DeserializeContainerAppsBuildResourceData(e)), _containerAppsBuildResourceContainerAppsBuildsByContainerAppClientDiagnostics, Pipeline, "ContainerAppsBuildResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _containerAppsBuildResourceContainerAppsBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResourceCollection.Exists"); + scope.Start(); + try + { + var response = _containerAppsBuildResourceContainerAppsBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _containerAppsBuildResourceContainerAppsBuildsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName} + /// + /// + /// Operation Id + /// ContainerAppsBuilds_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of a build. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var scope = _containerAppsBuildResourceContainerAppsBuildsClientDiagnostics.CreateScope("ContainerAppsBuildResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _containerAppsBuildResourceContainerAppsBuildsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, buildName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsBuildResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceData.Serialization.cs new file mode 100644 index 000000000000..0ecfbe4f27d2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceData.Serialization.cs @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class ContainerAppsBuildResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsBuildResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(BuildStatus)) + { + writer.WritePropertyName("buildStatus"u8); + writer.WriteStringValue(BuildStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DestinationContainerRegistry)) + { + writer.WritePropertyName("destinationContainerRegistry"u8); + writer.WriteObjectValue(DestinationContainerRegistry, options); + } + if (options.Format != "W" && Optional.IsDefined(Configuration)) + { + writer.WritePropertyName("configuration"u8); + writer.WriteObjectValue(Configuration, options); + } + if (options.Format != "W" && Optional.IsDefined(LogStreamEndpoint)) + { + writer.WritePropertyName("logStreamEndpoint"u8); + writer.WriteStringValue(LogStreamEndpoint); + } + writer.WriteEndObject(); + } + + ContainerAppsBuildResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsBuildResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerAppsBuildResourceData(document.RootElement, options); + } + + internal static ContainerAppsBuildResourceData DeserializeContainerAppsBuildResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + BuildProvisioningState? provisioningState = default; + BuildStatus? buildStatus = default; + ContainerRegistryWithCustomImage destinationContainerRegistry = default; + ContainerAppsBuildConfiguration configuration = default; + string logStreamEndpoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new BuildProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("buildStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + buildStatus = new BuildStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("destinationContainerRegistry"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationContainerRegistry = ContainerRegistryWithCustomImage.DeserializeContainerRegistryWithCustomImage(property0.Value, options); + continue; + } + if (property0.NameEquals("configuration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configuration = ContainerAppsBuildConfiguration.DeserializeContainerAppsBuildConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("logStreamEndpoint"u8)) + { + logStreamEndpoint = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerAppsBuildResourceData( + id, + name, + type, + systemData, + provisioningState, + buildStatus, + destinationContainerRegistry, + configuration, + logStreamEndpoint, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BuildStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" buildStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BuildStatus)) + { + builder.Append(" buildStatus: "); + builder.AppendLine($"'{BuildStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DestinationContainerRegistry), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" destinationContainerRegistry: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DestinationContainerRegistry)) + { + builder.Append(" destinationContainerRegistry: "); + BicepSerializationHelpers.AppendChildObject(builder, DestinationContainerRegistry, options, 4, false, " destinationContainerRegistry: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Configuration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configuration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Configuration)) + { + builder.Append(" configuration: "); + BicepSerializationHelpers.AppendChildObject(builder, Configuration, options, 4, false, " configuration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LogStreamEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logStreamEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LogStreamEndpoint)) + { + builder.Append(" logStreamEndpoint: "); + if (LogStreamEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LogStreamEndpoint}'''"); + } + else + { + builder.AppendLine($"'{LogStreamEndpoint}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerAppsBuildResourceData)} does not support writing '{options.Format}' format."); + } + } + + ContainerAppsBuildResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerAppsBuildResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerAppsBuildResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceData.cs new file mode 100644 index 000000000000..48d80f827ffc --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsBuildResourceData.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the ContainerAppsBuildResource data model. + /// Information pertaining to an individual build. + /// + public partial class ContainerAppsBuildResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerAppsBuildResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Build provisioning state. + /// Status of the build once it has been provisioned. + /// Container registry that the final image will be uploaded to. + /// Configuration of the build. + /// Endpoint from which the build logs can be streamed. + /// Keeps track of any properties unknown to the library. + internal ContainerAppsBuildResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BuildProvisioningState? provisioningState, BuildStatus? buildStatus, ContainerRegistryWithCustomImage destinationContainerRegistry, ContainerAppsBuildConfiguration configuration, string logStreamEndpoint, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + BuildStatus = buildStatus; + DestinationContainerRegistry = destinationContainerRegistry; + Configuration = configuration; + LogStreamEndpoint = logStreamEndpoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Build provisioning state. + [WirePath("properties.provisioningState")] + public BuildProvisioningState? ProvisioningState { get; } + /// Status of the build once it has been provisioned. + [WirePath("properties.buildStatus")] + public BuildStatus? BuildStatus { get; } + /// Container registry that the final image will be uploaded to. + [WirePath("properties.destinationContainerRegistry")] + public ContainerRegistryWithCustomImage DestinationContainerRegistry { get; } + /// Configuration of the build. + [WirePath("properties.configuration")] + public ContainerAppsBuildConfiguration Configuration { get; } + /// Endpoint from which the build logs can be streamed. + [WirePath("properties.logStreamEndpoint")] + public string LogStreamEndpoint { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResource.Serialization.cs new file mode 100644 index 000000000000..39b26f6b1254 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class ContainerAppsPatchResource : IJsonModel + { + private static ContainerAppsPatchResourceData s_dataDeserializationInstance; + private static ContainerAppsPatchResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ContainerAppsPatchResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + ContainerAppsPatchResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResource.cs new file mode 100644 index 000000000000..9f196ffe9110 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResource.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a ContainerAppsPatchResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetContainerAppsPatchResource method. + /// Otherwise you can get one from its parent resource using the GetContainerAppsPatchResource method. + /// + public partial class ContainerAppsPatchResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The containerAppName. + /// The patchName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics; + private readonly ContainerAppsPatchesRestOperations _containerAppsPatchResourceContainerAppsPatchesRestClient; + private readonly ContainerAppsPatchResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/containerApps/patches"; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppsPatchResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ContainerAppsPatchResource(ArmClient client, ContainerAppsPatchResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ContainerAppsPatchResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string containerAppsPatchResourceContainerAppsPatchesApiVersion); + _containerAppsPatchResourceContainerAppsPatchesRestClient = new ContainerAppsPatchesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppsPatchResourceContainerAppsPatchesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ContainerAppsPatchResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get details for specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.Get"); + scope.Start(); + try + { + var response = await _containerAppsPatchResourceContainerAppsPatchesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsPatchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get details for specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.Get"); + scope.Start(); + try + { + var response = _containerAppsPatchResourceContainerAppsPatchesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsPatchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.Delete"); + scope.Start(); + try + { + var response = await _containerAppsPatchResourceContainerAppsPatchesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.Delete"); + scope.Start(); + try + { + var response = _containerAppsPatchResourceContainerAppsPatchesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(_containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Configure the Container Apps Patch skip option by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/skipConfig + /// + /// + /// Operation Id + /// ContainerAppsPatches_SkipConfigure + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configure patcher to skip a patch or not. + /// The cancellation token to use. + /// is null. + public virtual async Task SkipConfigureAsync(WaitUntil waitUntil, PatchSkipConfig patchSkipConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patchSkipConfig, nameof(patchSkipConfig)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.SkipConfigure"); + scope.Start(); + try + { + var response = await _containerAppsPatchResourceContainerAppsPatchesRestClient.SkipConfigureAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patchSkipConfig, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateSkipConfigureRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patchSkipConfig).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Configure the Container Apps Patch skip option by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/skipConfig + /// + /// + /// Operation Id + /// ContainerAppsPatches_SkipConfigure + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configure patcher to skip a patch or not. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation SkipConfigure(WaitUntil waitUntil, PatchSkipConfig patchSkipConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patchSkipConfig, nameof(patchSkipConfig)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.SkipConfigure"); + scope.Start(); + try + { + var response = _containerAppsPatchResourceContainerAppsPatchesRestClient.SkipConfigure(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patchSkipConfig, cancellationToken); + var operation = new AppContainersArmOperation(_containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateSkipConfigureRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patchSkipConfig).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Apply a Container Apps Patch resource with patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/apply + /// + /// + /// Operation Id + /// ContainerAppsPatches_Apply + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ApplyAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.Apply"); + scope.Start(); + try + { + var response = await _containerAppsPatchResourceContainerAppsPatchesRestClient.ApplyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new ContainerAppsPatchResourceOperationSource(Client), _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateApplyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Apply a Container Apps Patch resource with patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/apply + /// + /// + /// Operation Id + /// ContainerAppsPatches_Apply + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Apply(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResource.Apply"); + scope.Start(); + try + { + var response = _containerAppsPatchResourceContainerAppsPatchesRestClient.Apply(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(new ContainerAppsPatchResourceOperationSource(Client), _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateApplyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceCollection.cs new file mode 100644 index 000000000000..3dcfffeee6b4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceCollection.cs @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetContainerAppsPatchResources method from an instance of . + /// + public partial class ContainerAppsPatchResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics; + private readonly ContainerAppsPatchesRestOperations _containerAppsPatchResourceContainerAppsPatchesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ContainerAppsPatchResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ContainerAppsPatchResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppsPatchResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ContainerAppsPatchResource.ResourceType, out string containerAppsPatchResourceContainerAppsPatchesApiVersion); + _containerAppsPatchResourceContainerAppsPatchesRestClient = new ContainerAppsPatchesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerAppsPatchResourceContainerAppsPatchesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppResource.ResourceType), nameof(id)); + } + + /// + /// Get details for specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResourceCollection.Get"); + scope.Start(); + try + { + var response = await _containerAppsPatchResourceContainerAppsPatchesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patchName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsPatchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get details for specific Container Apps Patch by patch name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResourceCollection.Get"); + scope.Start(); + try + { + var response = _containerAppsPatchResourceContainerAppsPatchesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patchName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsPatchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Container Apps Patch resources by ContainerApp. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches + /// + /// + /// Operation Id + /// ContainerAppsPatches_ListByContainerApp + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq 'Succeeded'. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateListByContainerAppRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateListByContainerAppNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ContainerAppsPatchResource(Client, ContainerAppsPatchResourceData.DeserializeContainerAppsPatchResourceData(e)), _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, "ContainerAppsPatchResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Container Apps Patch resources by ContainerApp. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches + /// + /// + /// Operation Id + /// ContainerAppsPatches_ListByContainerApp + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq 'Succeeded'. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateListByContainerAppRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerAppsPatchResourceContainerAppsPatchesRestClient.CreateListByContainerAppNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ContainerAppsPatchResource(Client, ContainerAppsPatchResourceData.DeserializeContainerAppsPatchResourceData(e)), _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics, Pipeline, "ContainerAppsPatchResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _containerAppsPatchResourceContainerAppsPatchesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patchName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResourceCollection.Exists"); + scope.Start(); + try + { + var response = _containerAppsPatchResourceContainerAppsPatchesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patchName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _containerAppsPatchResourceContainerAppsPatchesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patchName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsPatchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName} + /// + /// + /// Operation Id + /// ContainerAppsPatches_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the patch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var scope = _containerAppsPatchResourceContainerAppsPatchesClientDiagnostics.CreateScope("ContainerAppsPatchResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _containerAppsPatchResourceContainerAppsPatchesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patchName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ContainerAppsPatchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceData.Serialization.cs new file mode 100644 index 000000000000..cfdf2ff108a3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceData.Serialization.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class ContainerAppsPatchResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsPatchResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ContainerAppsPatchResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsPatchResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerAppsPatchResourceData(document.RootElement, options); + } + + internal static ContainerAppsPatchResourceData DeserializeContainerAppsPatchResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PatchProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = PatchProperties.DeserializePatchProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerAppsPatchResourceData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerAppsPatchResourceData)} does not support writing '{options.Format}' format."); + } + } + + ContainerAppsPatchResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerAppsPatchResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerAppsPatchResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceData.cs new file mode 100644 index 000000000000..de808fc9f362 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppsPatchResourceData.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the ContainerAppsPatchResource data model. + /// Container App Patch + /// + public partial class ContainerAppsPatchResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerAppsPatchResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties that describes current states of the patch resource. + /// Keeps track of any properties unknown to the library. + internal ContainerAppsPatchResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PatchProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Properties that describes current states of the patch resource. + [WirePath("properties")] + public PatchProperties Properties { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyCollection.cs new file mode 100644 index 000000000000..65fbf77fe8eb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDaprComponentResiliencyPolicies method from an instance of . + /// + public partial class DaprComponentResiliencyPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _daprComponentResiliencyPolicyClientDiagnostics; + private readonly DaprComponentResiliencyPoliciesRestOperations _daprComponentResiliencyPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected DaprComponentResiliencyPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DaprComponentResiliencyPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _daprComponentResiliencyPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", DaprComponentResiliencyPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DaprComponentResiliencyPolicyResource.ResourceType, out string daprComponentResiliencyPolicyApiVersion); + _daprComponentResiliencyPolicyRestClient = new DaprComponentResiliencyPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, daprComponentResiliencyPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppManagedEnvironmentDaprComponentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppManagedEnvironmentDaprComponentResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a resiliency policy for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Dapr Component Resiliency Policy. + /// Configuration details of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, DaprComponentResiliencyPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _daprComponentResiliencyPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var uri = _daprComponentResiliencyPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a resiliency policy for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Dapr Component Resiliency Policy. + /// Configuration details of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, DaprComponentResiliencyPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _daprComponentResiliencyPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, data, cancellationToken); + var uri = _daprComponentResiliencyPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Dapr component resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _daprComponentResiliencyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Dapr component resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.Get"); + scope.Start(); + try + { + var response = _daprComponentResiliencyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the resiliency policies for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _daprComponentResiliencyPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _daprComponentResiliencyPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DaprComponentResiliencyPolicyResource(Client, DaprComponentResiliencyPolicyData.DeserializeDaprComponentResiliencyPolicyData(e)), _daprComponentResiliencyPolicyClientDiagnostics, Pipeline, "DaprComponentResiliencyPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the resiliency policies for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _daprComponentResiliencyPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _daprComponentResiliencyPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DaprComponentResiliencyPolicyResource(Client, DaprComponentResiliencyPolicyData.DeserializeDaprComponentResiliencyPolicyData(e)), _daprComponentResiliencyPolicyClientDiagnostics, Pipeline, "DaprComponentResiliencyPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _daprComponentResiliencyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _daprComponentResiliencyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _daprComponentResiliencyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _daprComponentResiliencyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyData.Serialization.cs new file mode 100644 index 000000000000..e33546095636 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyData.Serialization.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class DaprComponentResiliencyPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(InboundPolicy)) + { + writer.WritePropertyName("inboundPolicy"u8); + writer.WriteObjectValue(InboundPolicy, options); + } + if (Optional.IsDefined(OutboundPolicy)) + { + writer.WritePropertyName("outboundPolicy"u8); + writer.WriteObjectValue(OutboundPolicy, options); + } + writer.WriteEndObject(); + } + + DaprComponentResiliencyPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentResiliencyPolicyData(document.RootElement, options); + } + + internal static DaprComponentResiliencyPolicyData DeserializeDaprComponentResiliencyPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DaprComponentResiliencyPolicyConfiguration inboundPolicy = default; + DaprComponentResiliencyPolicyConfiguration outboundPolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("inboundPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inboundPolicy = DaprComponentResiliencyPolicyConfiguration.DeserializeDaprComponentResiliencyPolicyConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("outboundPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outboundPolicy = DaprComponentResiliencyPolicyConfiguration.DeserializeDaprComponentResiliencyPolicyConfiguration(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentResiliencyPolicyData( + id, + name, + type, + systemData, + inboundPolicy, + outboundPolicy, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InboundPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inboundPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InboundPolicy)) + { + builder.Append(" inboundPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, InboundPolicy, options, 4, false, " inboundPolicy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutboundPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outboundPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutboundPolicy)) + { + builder.Append(" outboundPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, OutboundPolicy, options, 4, false, " outboundPolicy: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyData)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentResiliencyPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentResiliencyPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyData.cs new file mode 100644 index 000000000000..786a53e79f89 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyData.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the DaprComponentResiliencyPolicy data model. + /// Dapr Component Resiliency Policy. + /// + public partial class DaprComponentResiliencyPolicyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprComponentResiliencyPolicyData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The optional inbound component resiliency policy configuration. + /// The optional outbound component resiliency policy configuration. + /// Keeps track of any properties unknown to the library. + internal DaprComponentResiliencyPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DaprComponentResiliencyPolicyConfiguration inboundPolicy, DaprComponentResiliencyPolicyConfiguration outboundPolicy, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + InboundPolicy = inboundPolicy; + OutboundPolicy = outboundPolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The optional inbound component resiliency policy configuration. + [WirePath("properties.inboundPolicy")] + public DaprComponentResiliencyPolicyConfiguration InboundPolicy { get; set; } + /// The optional outbound component resiliency policy configuration. + [WirePath("properties.outboundPolicy")] + public DaprComponentResiliencyPolicyConfiguration OutboundPolicy { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyResource.Serialization.cs new file mode 100644 index 000000000000..185ebf77ca43 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class DaprComponentResiliencyPolicyResource : IJsonModel + { + private static DaprComponentResiliencyPolicyData s_dataDeserializationInstance; + private static DaprComponentResiliencyPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DaprComponentResiliencyPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + DaprComponentResiliencyPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyResource.cs new file mode 100644 index 000000000000..0331cb81a035 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprComponentResiliencyPolicyResource.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a DaprComponentResiliencyPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDaprComponentResiliencyPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetDaprComponentResiliencyPolicy method. + /// + public partial class DaprComponentResiliencyPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The environmentName. + /// The componentName. + /// The name. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _daprComponentResiliencyPolicyClientDiagnostics; + private readonly DaprComponentResiliencyPoliciesRestOperations _daprComponentResiliencyPolicyRestClient; + private readonly DaprComponentResiliencyPolicyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/managedEnvironments/daprComponents/resiliencyPolicies"; + + /// Initializes a new instance of the class for mocking. + protected DaprComponentResiliencyPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DaprComponentResiliencyPolicyResource(ArmClient client, DaprComponentResiliencyPolicyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DaprComponentResiliencyPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _daprComponentResiliencyPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string daprComponentResiliencyPolicyApiVersion); + _daprComponentResiliencyPolicyRestClient = new DaprComponentResiliencyPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, daprComponentResiliencyPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DaprComponentResiliencyPolicyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a Dapr component resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyResource.Get"); + scope.Start(); + try + { + var response = await _daprComponentResiliencyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Dapr component resiliency policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyResource.Get"); + scope.Start(); + try + { + var response = _daprComponentResiliencyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a resiliency policy for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _daprComponentResiliencyPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _daprComponentResiliencyPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a resiliency policy for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyResource.Delete"); + scope.Start(); + try + { + var response = _daprComponentResiliencyPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _daprComponentResiliencyPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a resiliency policy for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configuration details of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DaprComponentResiliencyPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyResource.Update"); + scope.Start(); + try + { + var response = await _daprComponentResiliencyPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _daprComponentResiliencyPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a resiliency policy for a Dapr component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name} + /// + /// + /// Operation Id + /// DaprComponentResiliencyPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configuration details of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DaprComponentResiliencyPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprComponentResiliencyPolicyClientDiagnostics.CreateScope("DaprComponentResiliencyPolicyResource.Update"); + scope.Start(); + try + { + var response = _daprComponentResiliencyPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _daprComponentResiliencyPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprComponentResiliencyPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionCollection.cs new file mode 100644 index 000000000000..5ffa8c1175cb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDaprSubscriptions method from an instance of . + /// + public partial class DaprSubscriptionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _daprSubscriptionClientDiagnostics; + private readonly DaprSubscriptionsRestOperations _daprSubscriptionRestClient; + + /// Initializes a new instance of the class for mocking. + protected DaprSubscriptionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DaprSubscriptionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _daprSubscriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", DaprSubscriptionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DaprSubscriptionResource.ResourceType, out string daprSubscriptionApiVersion); + _daprSubscriptionRestClient = new DaprSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, daprSubscriptionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppManagedEnvironmentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppManagedEnvironmentResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a Dapr subscription in a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Dapr subscription. + /// Configuration details of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, DaprSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _daprSubscriptionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var uri = _daprSubscriptionRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprSubscriptionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a Dapr subscription in a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Dapr subscription. + /// Configuration details of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, DaprSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _daprSubscriptionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var uri = _daprSubscriptionRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprSubscriptionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a dapr subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.Get"); + scope.Start(); + try + { + var response = await _daprSubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a dapr subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.Get"); + scope.Start(); + try + { + var response = _daprSubscriptionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Dapr subscriptions for a managed environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions + /// + /// + /// Operation Id + /// DaprSubscriptions_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _daprSubscriptionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _daprSubscriptionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DaprSubscriptionResource(Client, DaprSubscriptionData.DeserializeDaprSubscriptionData(e)), _daprSubscriptionClientDiagnostics, Pipeline, "DaprSubscriptionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the Dapr subscriptions for a managed environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions + /// + /// + /// Operation Id + /// DaprSubscriptions_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _daprSubscriptionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _daprSubscriptionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DaprSubscriptionResource(Client, DaprSubscriptionData.DeserializeDaprSubscriptionData(e)), _daprSubscriptionClientDiagnostics, Pipeline, "DaprSubscriptionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.Exists"); + scope.Start(); + try + { + var response = await _daprSubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.Exists"); + scope.Start(); + try + { + var response = _daprSubscriptionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _daprSubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DaprSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _daprSubscriptionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DaprSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionData.Serialization.cs new file mode 100644 index 000000000000..5e8fa046d5a7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionData.Serialization.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class DaprSubscriptionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(PubsubName)) + { + writer.WritePropertyName("pubsubName"u8); + writer.WriteStringValue(PubsubName); + } + if (Optional.IsDefined(Topic)) + { + writer.WritePropertyName("topic"u8); + writer.WriteStringValue(Topic); + } + if (Optional.IsDefined(DeadLetterTopic)) + { + writer.WritePropertyName("deadLetterTopic"u8); + writer.WriteStringValue(DeadLetterTopic); + } + if (Optional.IsDefined(Routes)) + { + writer.WritePropertyName("routes"u8); + writer.WriteObjectValue(Routes, options); + } + if (Optional.IsCollectionDefined(Scopes)) + { + writer.WritePropertyName("scopes"u8); + writer.WriteStartArray(); + foreach (var item in Scopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(BulkSubscribe)) + { + writer.WritePropertyName("bulkSubscribe"u8); + writer.WriteObjectValue(BulkSubscribe, options); + } + writer.WriteEndObject(); + } + + DaprSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprSubscriptionData(document.RootElement, options); + } + + internal static DaprSubscriptionData DeserializeDaprSubscriptionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string pubsubName = default; + string topic = default; + string deadLetterTopic = default; + DaprSubscriptionRoutes routes = default; + IList scopes = default; + IDictionary metadata = default; + DaprSubscriptionBulkSubscribeConfig bulkSubscribe = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("pubsubName"u8)) + { + pubsubName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("topic"u8)) + { + topic = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("deadLetterTopic"u8)) + { + deadLetterTopic = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("routes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + routes = DaprSubscriptionRoutes.DeserializeDaprSubscriptionRoutes(property0.Value, options); + continue; + } + if (property0.NameEquals("scopes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scopes = array; + continue; + } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property0.NameEquals("bulkSubscribe"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bulkSubscribe = DaprSubscriptionBulkSubscribeConfig.DeserializeDaprSubscriptionBulkSubscribeConfig(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprSubscriptionData( + id, + name, + type, + systemData, + pubsubName, + topic, + deadLetterTopic, + routes, + scopes ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + bulkSubscribe, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PubsubName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" pubsubName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PubsubName)) + { + builder.Append(" pubsubName: "); + if (PubsubName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PubsubName}'''"); + } + else + { + builder.AppendLine($"'{PubsubName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Topic), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" topic: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Topic)) + { + builder.Append(" topic: "); + if (Topic.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Topic}'''"); + } + else + { + builder.AppendLine($"'{Topic}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeadLetterTopic), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deadLetterTopic: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeadLetterTopic)) + { + builder.Append(" deadLetterTopic: "); + if (DeadLetterTopic.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeadLetterTopic}'''"); + } + else + { + builder.AppendLine($"'{DeadLetterTopic}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Routes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" routes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Routes)) + { + builder.Append(" routes: "); + BicepSerializationHelpers.AppendChildObject(builder, Routes, options, 4, false, " routes: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scopes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scopes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Scopes)) + { + if (Scopes.Any()) + { + builder.Append(" scopes: "); + builder.AppendLine("["); + foreach (var item in Scopes) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata.Any()) + { + builder.Append(" metadata: "); + builder.AppendLine("{"); + foreach (var item in Metadata) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BulkSubscribe), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bulkSubscribe: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BulkSubscribe)) + { + builder.Append(" bulkSubscribe: "); + BicepSerializationHelpers.AppendChildObject(builder, BulkSubscribe, options, 4, false, " bulkSubscribe: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprSubscriptionData)} does not support writing '{options.Format}' format."); + } + } + + DaprSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprSubscriptionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprSubscriptionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionData.cs new file mode 100644 index 000000000000..60b52403a324 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionData.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the DaprSubscription data model. + /// Dapr PubSub Event Subscription. + /// + public partial class DaprSubscriptionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprSubscriptionData() + { + Scopes = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Dapr PubSub component name. + /// Topic name. + /// Deadletter topic name. + /// Subscription routes. + /// Application scopes to restrict the subscription to specific apps. + /// Subscription metadata. + /// Bulk subscription options. + /// Keeps track of any properties unknown to the library. + internal DaprSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string pubsubName, string topic, string deadLetterTopic, DaprSubscriptionRoutes routes, IList scopes, IDictionary metadata, DaprSubscriptionBulkSubscribeConfig bulkSubscribe, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + PubsubName = pubsubName; + Topic = topic; + DeadLetterTopic = deadLetterTopic; + Routes = routes; + Scopes = scopes; + Metadata = metadata; + BulkSubscribe = bulkSubscribe; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Dapr PubSub component name. + [WirePath("properties.pubsubName")] + public string PubsubName { get; set; } + /// Topic name. + [WirePath("properties.topic")] + public string Topic { get; set; } + /// Deadletter topic name. + [WirePath("properties.deadLetterTopic")] + public string DeadLetterTopic { get; set; } + /// Subscription routes. + [WirePath("properties.routes")] + public DaprSubscriptionRoutes Routes { get; set; } + /// Application scopes to restrict the subscription to specific apps. + [WirePath("properties.scopes")] + public IList Scopes { get; } + /// Subscription metadata. + [WirePath("properties.metadata")] + public IDictionary Metadata { get; } + /// Bulk subscription options. + [WirePath("properties.bulkSubscribe")] + public DaprSubscriptionBulkSubscribeConfig BulkSubscribe { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionResource.Serialization.cs new file mode 100644 index 000000000000..a16b9a833aa5 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class DaprSubscriptionResource : IJsonModel + { + private static DaprSubscriptionData s_dataDeserializationInstance; + private static DaprSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DaprSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + DaprSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionResource.cs new file mode 100644 index 000000000000..622b4a9ec2f7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DaprSubscriptionResource.cs @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a DaprSubscription along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDaprSubscriptionResource method. + /// Otherwise you can get one from its parent resource using the GetDaprSubscription method. + /// + public partial class DaprSubscriptionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The environmentName. + /// The name. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _daprSubscriptionClientDiagnostics; + private readonly DaprSubscriptionsRestOperations _daprSubscriptionRestClient; + private readonly DaprSubscriptionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/managedEnvironments/daprSubscriptions"; + + /// Initializes a new instance of the class for mocking. + protected DaprSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DaprSubscriptionResource(ArmClient client, DaprSubscriptionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DaprSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _daprSubscriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string daprSubscriptionApiVersion); + _daprSubscriptionRestClient = new DaprSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, daprSubscriptionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DaprSubscriptionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a dapr subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionResource.Get"); + scope.Start(); + try + { + var response = await _daprSubscriptionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a dapr subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionResource.Get"); + scope.Start(); + try + { + var response = _daprSubscriptionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DaprSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Dapr subscription from a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = await _daprSubscriptionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _daprSubscriptionRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Dapr subscription from a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = _daprSubscriptionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _daprSubscriptionRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a Dapr subscription in a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configuration details of the Dapr subscription. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DaprSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionResource.Update"); + scope.Start(); + try + { + var response = await _daprSubscriptionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _daprSubscriptionRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprSubscriptionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a Dapr subscription in a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name} + /// + /// + /// Operation Id + /// DaprSubscriptions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configuration details of the Dapr subscription. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DaprSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _daprSubscriptionClientDiagnostics.CreateScope("DaprSubscriptionResource.Update"); + scope.Start(); + try + { + var response = _daprSubscriptionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _daprSubscriptionRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(Response.FromValue(new DaprSubscriptionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentCollection.cs new file mode 100644 index 000000000000..6236494f5a99 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDotNetComponents method from an instance of . + /// + public partial class DotNetComponentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dotNetComponentClientDiagnostics; + private readonly DotNetComponentsRestOperations _dotNetComponentRestClient; + + /// Initializes a new instance of the class for mocking. + protected DotNetComponentCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DotNetComponentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dotNetComponentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", DotNetComponentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DotNetComponentResource.ResourceType, out string dotNetComponentApiVersion); + _dotNetComponentRestClient = new DotNetComponentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dotNetComponentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppManagedEnvironmentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppManagedEnvironmentResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a .NET Component in a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the .NET Component. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dotNetComponentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new DotNetComponentOperationSource(Client), _dotNetComponentClientDiagnostics, Pipeline, _dotNetComponentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a .NET Component in a Managed Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the .NET Component. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dotNetComponentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new AppContainersArmOperation(new DotNetComponentOperationSource(Client), _dotNetComponentClientDiagnostics, Pipeline, _dotNetComponentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a .NET Component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.Get"); + scope.Start(); + try + { + var response = await _dotNetComponentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DotNetComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a .NET Component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.Get"); + scope.Start(); + try + { + var response = _dotNetComponentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DotNetComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the .NET Components for a managed environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents + /// + /// + /// Operation Id + /// DotNetComponents_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dotNetComponentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dotNetComponentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DotNetComponentResource(Client, DotNetComponentData.DeserializeDotNetComponentData(e)), _dotNetComponentClientDiagnostics, Pipeline, "DotNetComponentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the .NET Components for a managed environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents + /// + /// + /// Operation Id + /// DotNetComponents_List + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dotNetComponentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dotNetComponentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DotNetComponentResource(Client, DotNetComponentData.DeserializeDotNetComponentData(e)), _dotNetComponentClientDiagnostics, Pipeline, "DotNetComponentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.Exists"); + scope.Start(); + try + { + var response = await _dotNetComponentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.Exists"); + scope.Start(); + try + { + var response = _dotNetComponentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dotNetComponentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DotNetComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the .NET Component. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dotNetComponentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DotNetComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentData.Serialization.cs new file mode 100644 index 000000000000..663e35d809b0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentData.Serialization.cs @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class DotNetComponentData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ComponentType)) + { + writer.WritePropertyName("componentType"u8); + writer.WriteStringValue(ComponentType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Configurations)) + { + writer.WritePropertyName("configurations"u8); + writer.WriteStartArray(); + foreach (var item in Configurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ServiceBinds)) + { + writer.WritePropertyName("serviceBinds"u8); + writer.WriteStartArray(); + foreach (var item in ServiceBinds) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + DotNetComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDotNetComponentData(document.RootElement, options); + } + + internal static DotNetComponentData DeserializeDotNetComponentData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DotNetComponentType? componentType = default; + DotNetComponentProvisioningState? provisioningState = default; + IList configurations = default; + IList serviceBinds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("componentType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + componentType = new DotNetComponentType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DotNetComponentProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("configurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(DotNetComponentConfigurationProperty.DeserializeDotNetComponentConfigurationProperty(item, options)); + } + configurations = array; + continue; + } + if (property0.NameEquals("serviceBinds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(DotNetComponentServiceBind.DeserializeDotNetComponentServiceBind(item, options)); + } + serviceBinds = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DotNetComponentData( + id, + name, + type, + systemData, + componentType, + provisioningState, + configurations ?? new ChangeTrackingList(), + serviceBinds ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComponentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" componentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComponentType)) + { + builder.Append(" componentType: "); + builder.AppendLine($"'{ComponentType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Configurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Configurations)) + { + if (Configurations.Any()) + { + builder.Append(" configurations: "); + builder.AppendLine("["); + foreach (var item in Configurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " configurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceBinds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceBinds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServiceBinds)) + { + if (ServiceBinds.Any()) + { + builder.Append(" serviceBinds: "); + builder.AppendLine("["); + foreach (var item in ServiceBinds) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " serviceBinds: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DotNetComponentData)} does not support writing '{options.Format}' format."); + } + } + + DotNetComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDotNetComponentData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DotNetComponentData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentData.cs new file mode 100644 index 000000000000..cb6d48351546 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentData.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the DotNetComponent data model. + /// .NET Component. + /// + public partial class DotNetComponentData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DotNetComponentData() + { + Configurations = new ChangeTrackingList(); + ServiceBinds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Type of the .NET Component. + /// Provisioning state of the .NET Component. + /// List of .NET Components configuration properties. + /// List of .NET Components that are bound to the .NET component. + /// Keeps track of any properties unknown to the library. + internal DotNetComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DotNetComponentType? componentType, DotNetComponentProvisioningState? provisioningState, IList configurations, IList serviceBinds, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ComponentType = componentType; + ProvisioningState = provisioningState; + Configurations = configurations; + ServiceBinds = serviceBinds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of the .NET Component. + [WirePath("properties.componentType")] + public DotNetComponentType? ComponentType { get; set; } + /// Provisioning state of the .NET Component. + [WirePath("properties.provisioningState")] + public DotNetComponentProvisioningState? ProvisioningState { get; } + /// List of .NET Components configuration properties. + [WirePath("properties.configurations")] + public IList Configurations { get; } + /// List of .NET Components that are bound to the .NET component. + [WirePath("properties.serviceBinds")] + public IList ServiceBinds { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentResource.Serialization.cs new file mode 100644 index 000000000000..02ba2df8ad32 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class DotNetComponentResource : IJsonModel + { + private static DotNetComponentData s_dataDeserializationInstance; + private static DotNetComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DotNetComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + DotNetComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentResource.cs new file mode 100644 index 000000000000..91a656e9803a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/DotNetComponentResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a DotNetComponent along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDotNetComponentResource method. + /// Otherwise you can get one from its parent resource using the GetDotNetComponent method. + /// + public partial class DotNetComponentResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The environmentName. + /// The name. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dotNetComponentClientDiagnostics; + private readonly DotNetComponentsRestOperations _dotNetComponentRestClient; + private readonly DotNetComponentData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/managedEnvironments/dotNetComponents"; + + /// Initializes a new instance of the class for mocking. + protected DotNetComponentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DotNetComponentResource(ArmClient client, DotNetComponentData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DotNetComponentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dotNetComponentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dotNetComponentApiVersion); + _dotNetComponentRestClient = new DotNetComponentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dotNetComponentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DotNetComponentData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a .NET Component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentResource.Get"); + scope.Start(); + try + { + var response = await _dotNetComponentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DotNetComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a .NET Component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentResource.Get"); + scope.Start(); + try + { + var response = _dotNetComponentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DotNetComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a .NET Component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentResource.Delete"); + scope.Start(); + try + { + var response = await _dotNetComponentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(_dotNetComponentClientDiagnostics, Pipeline, _dotNetComponentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a .NET Component. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Delete + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentResource.Delete"); + scope.Start(); + try + { + var response = _dotNetComponentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppContainersArmOperation(_dotNetComponentClientDiagnostics, Pipeline, _dotNetComponentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches a .NET Component using JSON Merge Patch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Update + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentResource.Update"); + scope.Start(); + try + { + var response = await _dotNetComponentRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppContainersArmOperation(new DotNetComponentOperationSource(Client), _dotNetComponentClientDiagnostics, Pipeline, _dotNetComponentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches a .NET Component using JSON Merge Patch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name} + /// + /// + /// Operation Id + /// DotNetComponents_Update + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dotNetComponentClientDiagnostics.CreateScope("DotNetComponentResource.Update"); + scope.Start(); + try + { + var response = _dotNetComponentRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppContainersArmOperation(new DotNetComponentOperationSource(Client), _dotNetComponentClientDiagnostics, Pipeline, _dotNetComponentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs index cdaebdb7e2e0..94351aa2d1fe 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/AppContainersExtensions.cs @@ -33,6 +33,25 @@ private static MockableAppContainersSubscriptionResource GetMockableAppContainer return resource.GetCachedClient(client => new MockableAppContainersSubscriptionResource(client, resource.Id)); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AppResiliencyResource GetAppResiliencyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetAppResiliencyResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -52,6 +71,44 @@ public static ContainerAppAuthConfigResource GetContainerAppAuthConfigResource(t return GetMockableAppContainersArmClient(client).GetContainerAppAuthConfigResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static BuilderResource GetBuilderResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetBuilderResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static BuildResource GetBuildResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetBuildResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -128,25 +185,6 @@ public static ContainerAppConnectedEnvironmentDaprComponentResource GetContainer return GetMockableAppContainersArmClient(client).GetContainerAppConnectedEnvironmentDaprComponentResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static ContainerAppManagedEnvironmentDaprComponentResource GetContainerAppManagedEnvironmentDaprComponentResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableAppContainersArmClient(client).GetContainerAppManagedEnvironmentDaprComponentResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -204,6 +242,63 @@ public static ContainerAppDetectorPropertyResource GetContainerAppDetectorProper return GetMockableAppContainersArmClient(client).GetContainerAppDetectorPropertyResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ContainerAppsBuildResource GetContainerAppsBuildResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetContainerAppsBuildResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static LabelHistoryResource GetLabelHistoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetLabelHistoryResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ContainerAppsPatchResource GetContainerAppsPatchResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetContainerAppsPatchResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -394,6 +489,25 @@ public static ContainerAppJobResource GetContainerAppJobResource(this ArmClient return GetMockableAppContainersArmClient(client).GetContainerAppJobResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DotNetComponentResource GetDotNetComponentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetDotNetComponentResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -432,6 +546,44 @@ public static ContainerAppJobExecutionResource GetContainerAppJobExecutionResour return GetMockableAppContainersArmClient(client).GetContainerAppJobExecutionResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static LogicAppResource GetLogicAppResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetLogicAppResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetLogicAppWorkflowEnvelopeResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -470,6 +622,63 @@ public static ContainerAppPrivateEndpointConnectionResource GetContainerAppPriva return GetMockableAppContainersArmClient(client).GetContainerAppPrivateEndpointConnectionResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DaprComponentResiliencyPolicyResource GetDaprComponentResiliencyPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetDaprComponentResiliencyPolicyResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ContainerAppManagedEnvironmentDaprComponentResource GetContainerAppManagedEnvironmentDaprComponentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetContainerAppManagedEnvironmentDaprComponentResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DaprSubscriptionResource GetDaprSubscriptionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppContainersArmClient(client).GetDaprSubscriptionResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -566,41 +775,96 @@ public static ContainerAppSourceControlResource GetContainerAppSourceControlReso } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets a collection of BuilderResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static LogicAppResource GetLogicAppResource(this ArmClient client, ResourceIdentifier id) + /// The instance the method will execute against. + /// is null. + /// An object representing collection of BuilderResources and their operations over a BuilderResource. + public static BuilderResourceCollection GetBuilderResources(this ResourceGroupResource resourceGroupResource) { - Argument.AssertNotNull(client, nameof(client)); + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableAppContainersArmClient(client).GetLogicAppResource(id); + return GetMockableAppContainersResourceGroupResource(resourceGroupResource).GetBuilderResources(); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(this ArmClient client, ResourceIdentifier id) + /// The instance the method will execute against. + /// The name of the builder. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetBuilderResourceAsync(this ResourceGroupResource resourceGroupResource, string builderName, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(client, nameof(client)); + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableAppContainersArmClient(client).GetLogicAppWorkflowEnvelopeResource(id); + return await GetMockableAppContainersResourceGroupResource(resourceGroupResource).GetBuilderResourceAsync(builderName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the builder. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetBuilderResource(this ResourceGroupResource resourceGroupResource, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableAppContainersResourceGroupResource(resourceGroupResource).GetBuilderResource(builderName, cancellationToken); } /// @@ -633,7 +897,7 @@ public static ContainerAppConnectedEnvironmentCollection GetContainerAppConnecte /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -671,7 +935,7 @@ public static async Task> Get /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -726,7 +990,7 @@ public static ContainerAppCollection GetContainerApps(this ResourceGroupResource /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -764,7 +1028,7 @@ public static async Task> GetContainerAppAsync(th /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -819,7 +1083,7 @@ public static ContainerAppManagedEnvironmentCollection GetContainerAppManagedEnv /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -857,7 +1121,7 @@ public static async Task> GetCo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -912,7 +1176,7 @@ public static ContainerAppJobCollection GetContainerAppJobs(this ResourceGroupRe /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -950,7 +1214,7 @@ public static async Task> GetContainerAppJobAs /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1005,7 +1269,7 @@ public static SessionPoolCollection GetSessionPools(this ResourceGroupResource r /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1043,7 +1307,7 @@ public static async Task> GetSessionPoolAsync(this /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1081,7 +1345,7 @@ public static Response GetSessionPool(this ResourceGroupRes /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1114,7 +1378,7 @@ public static AsyncPageable GetAvailableWo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1147,7 +1411,7 @@ public static Pageable GetAvailableWorkloa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1180,7 +1444,7 @@ public static AsyncPageable GetBillingMetersAsync(this /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1200,6 +1464,78 @@ public static Pageable GetBillingMeters(this Subscript return GetMockableAppContainersSubscriptionResource(subscriptionResource).GetBillingMeters(location, cancellationToken); } + /// + /// List BuilderResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/builders + /// + /// + /// Operation Id + /// Builders_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetBuilderResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppContainersSubscriptionResource(subscriptionResource).GetBuilderResourcesAsync(cancellationToken); + } + + /// + /// List BuilderResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/builders + /// + /// + /// Operation Id + /// Builders_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetBuilderResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppContainersSubscriptionResource(subscriptionResource).GetBuilderResources(cancellationToken); + } + /// /// Get all connectedEnvironments for a subscription. /// @@ -1213,7 +1549,7 @@ public static Pageable GetBillingMeters(this Subscript /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1249,7 +1585,7 @@ public static AsyncPageable GetContain /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1285,7 +1621,7 @@ public static Pageable GetContainerApp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1321,7 +1657,7 @@ public static AsyncPageable GetContainerAppsAsync(this Sub /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1357,7 +1693,7 @@ public static Pageable GetContainerApps(this SubscriptionR /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1393,7 +1729,7 @@ public static AsyncPageable GetContainerAppJobsAsync(th /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1429,7 +1765,7 @@ public static Pageable GetContainerAppJobs(this Subscri /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1464,7 +1800,7 @@ public static async Task> GetCustomDomainVerificationIdAsync(th /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1499,7 +1835,7 @@ public static Response GetCustomDomainVerificationId(this SubscriptionRe /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1535,7 +1871,7 @@ public static AsyncPageable GetContainer /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1571,7 +1907,7 @@ public static Pageable GetContainerAppMa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1607,7 +1943,7 @@ public static AsyncPageable GetSessionPoolsAsync(this Subsc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -1643,7 +1979,7 @@ public static Pageable GetSessionPools(this SubscriptionRes /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -1676,7 +2012,7 @@ public static AsyncPageable GetUsagesAsync(this SubscriptionR /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersArmClient.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersArmClient.cs index 06142711e08f..a77f9f401229 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersArmClient.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersArmClient.cs @@ -34,6 +34,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AppResiliencyResource GetAppResiliencyResource(ResourceIdentifier id) + { + AppResiliencyResource.ValidateResourceId(id); + return new AppResiliencyResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -46,6 +58,30 @@ public virtual ContainerAppAuthConfigResource GetContainerAppAuthConfigResource( return new ContainerAppAuthConfigResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual BuilderResource GetBuilderResource(ResourceIdentifier id) + { + BuilderResource.ValidateResourceId(id); + return new BuilderResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual BuildResource GetBuildResource(ResourceIdentifier id) + { + BuildResource.ValidateResourceId(id); + return new BuildResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -94,18 +130,6 @@ public virtual ContainerAppConnectedEnvironmentDaprComponentResource GetContaine return new ContainerAppConnectedEnvironmentDaprComponentResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ContainerAppManagedEnvironmentDaprComponentResource GetContainerAppManagedEnvironmentDaprComponentResource(ResourceIdentifier id) - { - ContainerAppManagedEnvironmentDaprComponentResource.ValidateResourceId(id); - return new ContainerAppManagedEnvironmentDaprComponentResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -142,6 +166,42 @@ public virtual ContainerAppDetectorPropertyResource GetContainerAppDetectorPrope return new ContainerAppDetectorPropertyResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ContainerAppsBuildResource GetContainerAppsBuildResource(ResourceIdentifier id) + { + ContainerAppsBuildResource.ValidateResourceId(id); + return new ContainerAppsBuildResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual LabelHistoryResource GetLabelHistoryResource(ResourceIdentifier id) + { + LabelHistoryResource.ValidateResourceId(id); + return new LabelHistoryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ContainerAppsPatchResource GetContainerAppsPatchResource(ResourceIdentifier id) + { + ContainerAppsPatchResource.ValidateResourceId(id); + return new ContainerAppsPatchResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -262,6 +322,18 @@ public virtual ContainerAppJobResource GetContainerAppJobResource(ResourceIdenti return new ContainerAppJobResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DotNetComponentResource GetDotNetComponentResource(ResourceIdentifier id) + { + DotNetComponentResource.ValidateResourceId(id); + return new DotNetComponentResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -286,6 +358,30 @@ public virtual ContainerAppJobExecutionResource GetContainerAppJobExecutionResou return new ContainerAppJobExecutionResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual LogicAppResource GetLogicAppResource(ResourceIdentifier id) + { + LogicAppResource.ValidateResourceId(id); + return new LogicAppResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(ResourceIdentifier id) + { + LogicAppWorkflowEnvelopeResource.ValidateResourceId(id); + return new LogicAppWorkflowEnvelopeResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -310,6 +406,42 @@ public virtual ContainerAppPrivateEndpointConnectionResource GetContainerAppPriv return new ContainerAppPrivateEndpointConnectionResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DaprComponentResiliencyPolicyResource GetDaprComponentResiliencyPolicyResource(ResourceIdentifier id) + { + DaprComponentResiliencyPolicyResource.ValidateResourceId(id); + return new DaprComponentResiliencyPolicyResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ContainerAppManagedEnvironmentDaprComponentResource GetContainerAppManagedEnvironmentDaprComponentResource(ResourceIdentifier id) + { + ContainerAppManagedEnvironmentDaprComponentResource.ValidateResourceId(id); + return new ContainerAppManagedEnvironmentDaprComponentResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DaprSubscriptionResource GetDaprSubscriptionResource(ResourceIdentifier id) + { + DaprSubscriptionResource.ValidateResourceId(id); + return new DaprSubscriptionResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -369,29 +501,5 @@ public virtual ContainerAppSourceControlResource GetContainerAppSourceControlRes ContainerAppSourceControlResource.ValidateResourceId(id); return new ContainerAppSourceControlResource(Client, id); } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual LogicAppResource GetLogicAppResource(ResourceIdentifier id) - { - LogicAppResource.ValidateResourceId(id); - return new LogicAppResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual LogicAppWorkflowEnvelopeResource GetLogicAppWorkflowEnvelopeResource(ResourceIdentifier id) - { - LogicAppWorkflowEnvelopeResource.ValidateResourceId(id); - return new LogicAppWorkflowEnvelopeResource(Client, id); - } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersResourceGroupResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersResourceGroupResource.cs index 0faaca65363d..872d0e2af835 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersResourceGroupResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersResourceGroupResource.cs @@ -33,6 +33,75 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// Gets a collection of BuilderResources in the ResourceGroupResource. + /// An object representing collection of BuilderResources and their operations over a BuilderResource. + public virtual BuilderResourceCollection GetBuilderResources() + { + return GetCachedClient(client => new BuilderResourceCollection(client, Id)); + } + + /// + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetBuilderResourceAsync(string builderName, CancellationToken cancellationToken = default) + { + return await GetBuilderResources().GetAsync(builderName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a BuilderResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName} + /// + /// + /// Operation Id + /// Builders_Get + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the builder. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetBuilderResource(string builderName, CancellationToken cancellationToken = default) + { + return GetBuilderResources().Get(builderName, cancellationToken); + } + /// Gets a collection of ContainerAppConnectedEnvironmentResources in the ResourceGroupResource. /// An object representing collection of ContainerAppConnectedEnvironmentResources and their operations over a ContainerAppConnectedEnvironmentResource. public virtual ContainerAppConnectedEnvironmentCollection GetContainerAppConnectedEnvironments() @@ -53,7 +122,7 @@ public virtual ContainerAppConnectedEnvironmentCollection GetContainerAppConnect /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -84,7 +153,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -122,7 +191,7 @@ public virtual ContainerAppCollection GetContainerApps() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -153,7 +222,7 @@ public virtual async Task> GetContainerAppAsync(s /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -191,7 +260,7 @@ public virtual ContainerAppManagedEnvironmentCollection GetContainerAppManagedEn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -222,7 +291,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -260,7 +329,7 @@ public virtual ContainerAppJobCollection GetContainerAppJobs() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -291,7 +360,7 @@ public virtual async Task> GetContainerAppJobA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -329,7 +398,7 @@ public virtual SessionPoolCollection GetSessionPools() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -360,7 +429,7 @@ public virtual async Task> GetSessionPoolAsync(str /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersSubscriptionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersSubscriptionResource.cs index b5a6d3586f2e..b9e295906f09 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersSubscriptionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Extensions/MockableAppContainersSubscriptionResource.cs @@ -22,6 +22,8 @@ public partial class MockableAppContainersSubscriptionResource : ArmResource private AvailableWorkloadProfilesRestOperations _availableWorkloadProfilesRestClient; private ClientDiagnostics _billingMetersClientDiagnostics; private BillingMetersRestOperations _billingMetersRestClient; + private ClientDiagnostics _builderResourceBuildersClientDiagnostics; + private BuildersRestOperations _builderResourceBuildersRestClient; private ClientDiagnostics _containerAppConnectedEnvironmentConnectedEnvironmentsClientDiagnostics; private ConnectedEnvironmentsRestOperations _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient; private ClientDiagnostics _containerAppClientDiagnostics; @@ -53,6 +55,8 @@ internal MockableAppContainersSubscriptionResource(ArmClient client, ResourceIde private AvailableWorkloadProfilesRestOperations AvailableWorkloadProfilesRestClient => _availableWorkloadProfilesRestClient ??= new AvailableWorkloadProfilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics BillingMetersClientDiagnostics => _billingMetersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppContainers", ProviderConstants.DefaultProviderNamespace, Diagnostics); private BillingMetersRestOperations BillingMetersRestClient => _billingMetersRestClient ??= new BillingMetersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics BuilderResourceBuildersClientDiagnostics => _builderResourceBuildersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppContainers", BuilderResource.ResourceType.Namespace, Diagnostics); + private BuildersRestOperations BuilderResourceBuildersRestClient => _builderResourceBuildersRestClient ??= new BuildersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(BuilderResource.ResourceType)); private ClientDiagnostics ContainerAppConnectedEnvironmentConnectedEnvironmentsClientDiagnostics => _containerAppConnectedEnvironmentConnectedEnvironmentsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppConnectedEnvironmentResource.ResourceType.Namespace, Diagnostics); private ConnectedEnvironmentsRestOperations ContainerAppConnectedEnvironmentConnectedEnvironmentsRestClient => _containerAppConnectedEnvironmentConnectedEnvironmentsRestClient ??= new ConnectedEnvironmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ContainerAppConnectedEnvironmentResource.ResourceType)); private ClientDiagnostics ContainerAppClientDiagnostics => _containerAppClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppContainers", ContainerAppResource.ResourceType.Namespace, Diagnostics); @@ -87,7 +91,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -114,7 +118,7 @@ public virtual AsyncPageable GetAvailableW /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -141,7 +145,7 @@ public virtual Pageable GetAvailableWorklo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -167,7 +171,7 @@ public virtual AsyncPageable GetBillingMetersAsync(Azu /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -180,6 +184,66 @@ public virtual Pageable GetBillingMeters(AzureLocation return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ContainerAppBillingMeter.DeserializeContainerAppBillingMeter(e), BillingMetersClientDiagnostics, Pipeline, "MockableAppContainersSubscriptionResource.GetBillingMeters", "value", null, cancellationToken); } + /// + /// List BuilderResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/builders + /// + /// + /// Operation Id + /// Builders_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetBuilderResourcesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => BuilderResourceBuildersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BuilderResourceBuildersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new BuilderResource(Client, BuilderResourceData.DeserializeBuilderResourceData(e)), BuilderResourceBuildersClientDiagnostics, Pipeline, "MockableAppContainersSubscriptionResource.GetBuilderResources", "value", "nextLink", cancellationToken); + } + + /// + /// List BuilderResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.App/builders + /// + /// + /// Operation Id + /// Builders_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetBuilderResources(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => BuilderResourceBuildersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => BuilderResourceBuildersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new BuilderResource(Client, BuilderResourceData.DeserializeBuilderResourceData(e)), BuilderResourceBuildersClientDiagnostics, Pipeline, "MockableAppContainersSubscriptionResource.GetBuilderResources", "value", "nextLink", cancellationToken); + } + /// /// Get all connectedEnvironments for a subscription. /// @@ -193,7 +257,7 @@ public virtual Pageable GetBillingMeters(AzureLocation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -223,7 +287,7 @@ public virtual AsyncPageable GetContai /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -253,7 +317,7 @@ public virtual Pageable GetContainerAp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -283,7 +347,7 @@ public virtual AsyncPageable GetContainerAppsAsync(Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +377,7 @@ public virtual Pageable GetContainerApps(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -343,7 +407,7 @@ public virtual AsyncPageable GetContainerAppJobsAsync(C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -373,7 +437,7 @@ public virtual Pageable GetContainerAppJobs(Cancellatio /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -411,7 +475,7 @@ public virtual async Task> GetCustomDomainVerificationIdAsync(C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -449,7 +513,7 @@ public virtual Response GetCustomDomainVerificationId(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -479,7 +543,7 @@ public virtual AsyncPageable GetContaine /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -509,7 +573,7 @@ public virtual Pageable GetContainerAppM /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -539,7 +603,7 @@ public virtual AsyncPageable GetSessionPoolsAsync(Cancellat /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -569,7 +633,7 @@ public virtual Pageable GetSessionPools(CancellationToken c /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// @@ -596,7 +660,7 @@ public virtual AsyncPageable GetUsagesAsync(AzureLocation loc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentCollection.cs index b4b5d3084ee4..993744d02226 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string name, /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string name, CancellationToke /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentData.cs index c8642d788bd3..3f6ef7d7157c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentData.cs @@ -64,7 +64,7 @@ public JavaComponentData() /// /// Java Component resource specific properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , , and . /// /// Keeps track of any properties unknown to the library. internal JavaComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, JavaComponentProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) @@ -76,7 +76,7 @@ internal JavaComponentData(ResourceIdentifier id, string name, ResourceType reso /// /// Java Component resource specific properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , , and . /// [WirePath("properties")] public JavaComponentProperties Properties { get; set; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.cs index 43781f0ac9cd..849094c75a7d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryCollection.cs new file mode 100644 index 000000000000..d9a2a9e16981 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryCollection.cs @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetLabelHistories method from an instance of . + /// + public partial class LabelHistoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _labelHistoryContainerAppsLabelHistoryClientDiagnostics; + private readonly ContainerAppsLabelHistoryRestOperations _labelHistoryContainerAppsLabelHistoryRestClient; + + /// Initializes a new instance of the class for mocking. + protected LabelHistoryCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal LabelHistoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _labelHistoryContainerAppsLabelHistoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", LabelHistoryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(LabelHistoryResource.ResourceType, out string labelHistoryContainerAppsLabelHistoryApiVersion); + _labelHistoryContainerAppsLabelHistoryRestClient = new ContainerAppsLabelHistoryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, labelHistoryContainerAppsLabelHistoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ContainerAppResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerAppResource.ResourceType), nameof(id)); + } + + /// + /// Get the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryCollection.Get"); + scope.Start(); + try + { + var response = await _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistoryAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, labelName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new LabelHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryCollection.Get"); + scope.Start(); + try + { + var response = _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistory(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, labelName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new LabelHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Label History for a given Container App. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_ListLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The filter to apply on the operation. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _labelHistoryContainerAppsLabelHistoryRestClient.CreateListLabelHistoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _labelHistoryContainerAppsLabelHistoryRestClient.CreateListLabelHistoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new LabelHistoryResource(Client, LabelHistoryData.DeserializeLabelHistoryData(e)), _labelHistoryContainerAppsLabelHistoryClientDiagnostics, Pipeline, "LabelHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the Label History for a given Container App. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_ListLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The filter to apply on the operation. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _labelHistoryContainerAppsLabelHistoryRestClient.CreateListLabelHistoryRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _labelHistoryContainerAppsLabelHistoryRestClient.CreateListLabelHistoryNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new LabelHistoryResource(Client, LabelHistoryData.DeserializeLabelHistoryData(e)), _labelHistoryContainerAppsLabelHistoryClientDiagnostics, Pipeline, "LabelHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryCollection.Exists"); + scope.Start(); + try + { + var response = await _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistoryAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, labelName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryCollection.Exists"); + scope.Start(); + try + { + var response = _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistory(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, labelName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistoryAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, labelName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new LabelHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Container App label. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistory(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, labelName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new LabelHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryData.Serialization.cs new file mode 100644 index 000000000000..98323af052b6 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryData.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class LabelHistoryData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + LabelHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLabelHistoryData(document.RootElement, options); + } + + internal static LabelHistoryData DeserializeLabelHistoryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + LabelHistoryProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = LabelHistoryProperties.DeserializeLabelHistoryProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LabelHistoryData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("LabelHistoryRecords", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine("{"); + builder.Append(" records: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(LabelHistoryData)} does not support writing '{options.Format}' format."); + } + } + + LabelHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLabelHistoryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LabelHistoryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryData.cs new file mode 100644 index 000000000000..b890871bef4b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryData.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A class representing the LabelHistory data model. + /// Container App Label History. + /// + public partial class LabelHistoryData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LabelHistoryData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Container App Label History resource specific properties. + /// Keeps track of any properties unknown to the library. + internal LabelHistoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, LabelHistoryProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Container App Label History resource specific properties. + internal LabelHistoryProperties Properties { get; set; } + /// List of label history records. + [WirePath("properties.records")] + public IReadOnlyList LabelHistoryRecords + { + get + { + if (Properties is null) + Properties = new LabelHistoryProperties(); + return Properties.Records; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryResource.Serialization.cs new file mode 100644 index 000000000000..ad54fb414745 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppContainers +{ + public partial class LabelHistoryResource : IJsonModel + { + private static LabelHistoryData s_dataDeserializationInstance; + private static LabelHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + LabelHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); + + LabelHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryResource.cs new file mode 100644 index 000000000000..e10bbd29f488 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LabelHistoryResource.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + /// + /// A Class representing a LabelHistory along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetLabelHistoryResource method. + /// Otherwise you can get one from its parent resource using the GetLabelHistory method. + /// + public partial class LabelHistoryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The containerAppName. + /// The labelName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string containerAppName, string labelName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _labelHistoryContainerAppsLabelHistoryClientDiagnostics; + private readonly ContainerAppsLabelHistoryRestOperations _labelHistoryContainerAppsLabelHistoryRestClient; + private readonly LabelHistoryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.App/containerApps/labelHistory"; + + /// Initializes a new instance of the class for mocking. + protected LabelHistoryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal LabelHistoryResource(ArmClient client, LabelHistoryData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal LabelHistoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _labelHistoryContainerAppsLabelHistoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppContainers", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string labelHistoryContainerAppsLabelHistoryApiVersion); + _labelHistoryContainerAppsLabelHistoryRestClient = new ContainerAppsLabelHistoryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, labelHistoryContainerAppsLabelHistoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual LabelHistoryData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryResource.Get"); + scope.Start(); + try + { + var response = await _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistoryAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new LabelHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_GetLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryResource.Get"); + scope.Start(); + try + { + var response = _labelHistoryContainerAppsLabelHistoryRestClient.GetLabelHistory(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new LabelHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_DeleteLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryResource.Delete"); + scope.Start(); + try + { + var response = await _labelHistoryContainerAppsLabelHistoryRestClient.DeleteLabelHistoryAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _labelHistoryContainerAppsLabelHistoryRestClient.CreateDeleteLabelHistoryRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the history of a label. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName} + /// + /// + /// Operation Id + /// ContainerAppsLabelHistory_DeleteLabelHistory + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _labelHistoryContainerAppsLabelHistoryClientDiagnostics.CreateScope("LabelHistoryResource.Delete"); + scope.Start(); + try + { + var response = _labelHistoryContainerAppsLabelHistoryRestClient.DeleteLabelHistory(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _labelHistoryContainerAppsLabelHistoryRestClient.CreateDeleteLabelHistoryRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppContainersArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppCollection.cs index 9ba4928cc7d5..c63696844b3d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// Logic app resource properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -112,7 +112,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -121,7 +121,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// Logic app resource properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string logicAppNa /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(string logicAppNa /// /// /// - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -253,7 +253,7 @@ public virtual Response Get(string logicAppName, CancellationT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string logicAppName, CancellationT /// /// /// - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string logicAppName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual async Task> ExistsAsync(string logicAppName, Cance /// /// /// - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -339,7 +339,7 @@ public virtual Response Exists(string logicAppName, CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual Response Exists(string logicAppName, CancellationToken canc /// /// /// - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -384,7 +384,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -392,7 +392,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.Serialization.cs index 4bc5186ccffb..6f652298e6cc 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.Serialization.cs @@ -37,6 +37,18 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Properties); +#else + using (JsonDocument document = JsonDocument.Parse(Properties, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } LogicAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -59,6 +71,7 @@ internal static LogicAppData DeserializeLogicAppData(JsonElement element, ModelR { return null; } + BinaryData properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -67,6 +80,15 @@ internal static LogicAppData DeserializeLogicAppData(JsonElement element, ModelR Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = BinaryData.FromString(property.Value.GetRawText()); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -97,7 +119,13 @@ internal static LogicAppData DeserializeLogicAppData(JsonElement element, ModelR } } serializedAdditionalRawData = rawDataDictionary; - return new LogicAppData(id, name, type, systemData, serializedAdditionalRawData); + return new LogicAppData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -134,6 +162,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + builder.AppendLine($"'{Properties.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.cs index feab97fb5ad3..f91b6b426043 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppData.cs @@ -60,10 +60,45 @@ public LogicAppData() /// The name. /// The resourceType. /// The systemData. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal LogicAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal LogicAppData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BinaryData properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } + + /// + /// The resource-specific properties for this resource. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties")] + public BinaryData Properties { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppResource.cs index 205269eb6f9c..b86dde8fd18c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppResource.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; namespace Azure.ResourceManager.AppContainers { @@ -108,7 +109,7 @@ public virtual LogicAppWorkflowEnvelopeCollection GetLogicAppWorkflowEnvelopes() /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -139,7 +140,7 @@ public virtual async Task> GetLogicAp /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -170,7 +171,7 @@ public virtual Response GetLogicAppWorkflowEnv /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -210,7 +211,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -250,7 +251,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -294,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -338,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -386,7 +387,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -421,6 +422,84 @@ public virtual ArmOperation Update(WaitUntil waitUntil, LogicA } } + /// + /// Creates or updates the artifacts for the logic app + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// LogicApps_DeployWorkflowArtifacts + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual async Task DeployWorkflowArtifactsAsync(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _logicAppClientDiagnostics.CreateScope("LogicAppResource.DeployWorkflowArtifacts"); + scope.Start(); + try + { + var response = await _logicAppRestClient.DeployWorkflowArtifactsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowArtifacts, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the artifacts for the logic app + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// LogicApps_DeployWorkflowArtifacts + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual Response DeployWorkflowArtifacts(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _logicAppClientDiagnostics.CreateScope("LogicAppResource.DeployWorkflowArtifacts"); + scope.Start(); + try + { + var response = _logicAppRestClient.DeployWorkflowArtifacts(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowArtifacts, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Gets logic app's connections. /// @@ -434,7 +513,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, LogicA /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -472,7 +551,7 @@ public virtual async Task> GetWorkflo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -496,5 +575,91 @@ public virtual Response GetWorkflowsConnection throw; } } + + /// + /// Proxies a the API call to the logic app backed by the container app. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/invoke + /// + /// + /// Operation Id + /// LogicApps_Invoke + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The proxy path for the API call. + /// The proxy method for the API call. + /// The cancellation token to use. + /// is null. + public virtual async Task> InvokeAsync(string xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(xMsLogicAppsProxyPath, nameof(xMsLogicAppsProxyPath)); + + using var scope = _logicAppClientDiagnostics.CreateScope("LogicAppResource.Invoke"); + scope.Start(); + try + { + var response = await _logicAppRestClient.InvokeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Proxies a the API call to the logic app backed by the container app. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/invoke + /// + /// + /// Operation Id + /// LogicApps_Invoke + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The proxy path for the API call. + /// The proxy method for the API call. + /// The cancellation token to use. + /// is null. + public virtual Response Invoke(string xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(xMsLogicAppsProxyPath, nameof(xMsLogicAppsProxyPath)); + + using var scope = _logicAppClientDiagnostics.CreateScope("LogicAppResource.Invoke"); + scope.Start(); + try + { + var response = _logicAppRestClient.Invoke(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeCollection.cs index 450df9a9f85c..cc28e0199192 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string workflowNam /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string workflowName, Cance /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string workflowName, CancellationToken canc /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.Serialization.cs index e78a262a9d5c..09bbfd8ce0c0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.Serialization.cs @@ -41,7 +41,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); + writer.WriteStringValue(Kind); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); } if (Optional.IsDefined(Properties)) { @@ -70,7 +75,8 @@ internal static LogicAppWorkflowEnvelopeData DeserializeLogicAppWorkflowEnvelope { return null; } - LogicAppWorkflowKind? kind = default; + string kind = default; + AzureLocation? location = default; LogicAppWorkflowEnvelopeProperties properties = default; ResourceIdentifier id = default; string name = default; @@ -81,12 +87,17 @@ internal static LogicAppWorkflowEnvelopeData DeserializeLogicAppWorkflowEnvelope foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - kind = new LogicAppWorkflowKind(property.Value.GetString()); + location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("properties"u8)) @@ -134,6 +145,7 @@ internal static LogicAppWorkflowEnvelopeData DeserializeLogicAppWorkflowEnvelope type, systemData, kind, + location, properties, serializedAdditionalRawData); } @@ -172,6 +184,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); if (hasPropertyOverride) { @@ -183,7 +210,15 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(Kind)) { builder.Append(" kind: "); - builder.AppendLine($"'{Kind.Value.ToString()}'"); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.cs index 5b2f25d59a05..f0102df6b897 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.AppContainers { /// /// A class representing the LogicAppWorkflowEnvelope data model. - /// Schema for the workflow object. + /// Workflow properties definition. /// public partial class LogicAppWorkflowEnvelopeData : ResourceData { @@ -52,7 +52,7 @@ public partial class LogicAppWorkflowEnvelopeData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public LogicAppWorkflowEnvelopeData() + internal LogicAppWorkflowEnvelopeData() { } @@ -61,21 +61,26 @@ public LogicAppWorkflowEnvelopeData() /// The name. /// The resourceType. /// The systemData. - /// Gets the logic app hybrid workflow kind. + /// The resource kind. + /// The resource location. /// Additional workflow properties. /// Keeps track of any properties unknown to the library. - internal LogicAppWorkflowEnvelopeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, LogicAppWorkflowKind? kind, LogicAppWorkflowEnvelopeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal LogicAppWorkflowEnvelopeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, AzureLocation? location, LogicAppWorkflowEnvelopeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Kind = kind; + Location = location; Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the logic app hybrid workflow kind. + /// The resource kind. [WirePath("kind")] - public LogicAppWorkflowKind? Kind { get; set; } + public string Kind { get; } + /// The resource location. + [WirePath("location")] + public AzureLocation? Location { get; } /// Additional workflow properties. [WirePath("properties")] - public LogicAppWorkflowEnvelopeProperties Properties { get; set; } + public LogicAppWorkflowEnvelopeProperties Properties { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeResource.cs index d9ce37f7f237..c83a83aa54f1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LogicAppWorkflowEnvelopeResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/BuildResourceOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/BuildResourceOperationSource.cs new file mode 100644 index 000000000000..dca832eab2f7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/BuildResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers +{ + internal class BuildResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BuildResourceOperationSource(ArmClient client) + { + _client = client; + } + + BuildResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return new BuildResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return await Task.FromResult(new BuildResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs new file mode 100644 index 000000000000..0f2a32bde8ee --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/BuilderResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers +{ + internal class BuilderResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BuilderResourceOperationSource(ArmClient client) + { + _client = client; + } + + BuilderResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return new BuilderResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return await Task.FromResult(new BuilderResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppConnectedEnvironmentDaprComponentOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppConnectedEnvironmentDaprComponentOperationSource.cs index a9a5b2dcfb5d..fb02124b0b3c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppConnectedEnvironmentDaprComponentOperationSource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppConnectedEnvironmentDaprComponentOperationSource.cs @@ -23,13 +23,13 @@ internal ContainerAppConnectedEnvironmentDaprComponentOperationSource(ArmClient ContainerAppConnectedEnvironmentDaprComponentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); return new ContainerAppConnectedEnvironmentDaprComponentResource(_client, data); } async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); return await Task.FromResult(new ContainerAppConnectedEnvironmentDaprComponentResource(_client, data)).ConfigureAwait(false); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppsPatchResourceOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppsPatchResourceOperationSource.cs new file mode 100644 index 000000000000..a8eebabefcd9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/ContainerAppsPatchResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers +{ + internal class ContainerAppsPatchResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ContainerAppsPatchResourceOperationSource(ArmClient client) + { + _client = client; + } + + ContainerAppsPatchResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return new ContainerAppsPatchResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return await Task.FromResult(new ContainerAppsPatchResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/DotNetComponentOperationSource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/DotNetComponentOperationSource.cs new file mode 100644 index 000000000000..8d4c29cb50b2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/LongRunningOperation/DotNetComponentOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers +{ + internal class DotNetComponentOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DotNetComponentOperationSource(ArmClient client) + { + _client = client; + } + + DotNetComponentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return new DotNetComponentResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerAppContainersContext.Default); + return await Task.FromResult(new DotNetComponentResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.Serialization.cs index 828dac8154a4..754b68adf520 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.Serialization.cs @@ -50,6 +50,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ephemeralStorage"u8); writer.WriteStringValue(EphemeralStorage); } + if (Optional.IsDefined(Gpu)) + { + writer.WritePropertyName("gpu"u8); + writer.WriteNumberValue(Gpu.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -90,6 +95,7 @@ internal static AppContainerResources DeserializeAppContainerResources(JsonEleme double? cpu = default; string memory = default; string ephemeralStorage = default; + double? gpu = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -113,13 +119,22 @@ internal static AppContainerResources DeserializeAppContainerResources(JsonEleme ephemeralStorage = property.Value.GetString(); continue; } + if (property.NameEquals("gpu"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gpu = property.Value.GetDouble(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AppContainerResources(cpu, memory, ephemeralStorage, serializedAdditionalRawData); + return new AppContainerResources(cpu, memory, ephemeralStorage, gpu, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -194,6 +209,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Gpu), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gpu: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Gpu)) + { + builder.Append(" gpu: "); + builder.AppendLine($"'{Gpu.Value.ToString()}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.cs index 551e7de26e98..c4fd947d9139 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppContainerResources.cs @@ -54,12 +54,14 @@ public AppContainerResources() /// Required CPU in cores, e.g. 0.5. /// Required memory, e.g. "250Mb". /// Ephemeral Storage, e.g. "1Gi". + /// Required GPU in cores for GPU based app, e.g. 1.0. /// Keeps track of any properties unknown to the library. - internal AppContainerResources(double? cpu, string memory, string ephemeralStorage, IDictionary serializedAdditionalRawData) + internal AppContainerResources(double? cpu, string memory, string ephemeralStorage, double? gpu, IDictionary serializedAdditionalRawData) { Cpu = cpu; Memory = memory; EphemeralStorage = ephemeralStorage; + Gpu = gpu; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,5 +74,8 @@ internal AppContainerResources(double? cpu, string memory, string ephemeralStora /// Ephemeral Storage, e.g. "1Gi". [WirePath("ephemeralStorage")] public string EphemeralStorage { get; } + /// Required GPU in cores for GPU based app, e.g. 1.0. + [WirePath("gpu")] + public double? Gpu { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppInsightsConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppInsightsConfiguration.Serialization.cs new file mode 100644 index 000000000000..d33c520c8917 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppInsightsConfiguration.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class AppInsightsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppInsightsConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteStringValue(ConnectionString); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AppInsightsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppInsightsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAppInsightsConfiguration(document.RootElement, options); + } + + internal static AppInsightsConfiguration DeserializeAppInsightsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string connectionString = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connectionString"u8)) + { + connectionString = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AppInsightsConfiguration(connectionString, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionString), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionString: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionString)) + { + builder.Append(" connectionString: "); + if (ConnectionString.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionString}'''"); + } + else + { + builder.AppendLine($"'{ConnectionString}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AppInsightsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AppInsightsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAppInsightsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AppInsightsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppInsightsConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppInsightsConfiguration.cs new file mode 100644 index 000000000000..e69d78beeaba --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppInsightsConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of Application Insights. + internal partial class AppInsightsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AppInsightsConfiguration() + { + } + + /// Initializes a new instance of . + /// Application Insights connection string. + /// Keeps track of any properties unknown to the library. + internal AppInsightsConfiguration(string connectionString, IDictionary serializedAdditionalRawData) + { + ConnectionString = connectionString; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Application Insights connection string. + [WirePath("connectionString")] + public string ConnectionString { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppResiliencyCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppResiliencyCollection.Serialization.cs new file mode 100644 index 000000000000..593460b685cd --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppResiliencyCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class AppResiliencyCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppResiliencyCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AppResiliencyCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppResiliencyCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAppResiliencyCollection(document.RootElement, options); + } + + internal static AppResiliencyCollection DeserializeAppResiliencyCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppResiliencyData.DeserializeAppResiliencyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AppResiliencyCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AppResiliencyCollection)} does not support writing '{options.Format}' format."); + } + } + + AppResiliencyCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAppResiliencyCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AppResiliencyCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppResiliencyCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppResiliencyCollection.cs new file mode 100644 index 000000000000..0578e18fac80 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AppResiliencyCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Collection of AppResiliency policies. + internal partial class AppResiliencyCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal AppResiliencyCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal AppResiliencyCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AppResiliencyCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AzureResourceManagerAppContainersContext.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AzureResourceManagerAppContainersContext.cs index 63d501a4858c..ee55c4c912ca 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AzureResourceManagerAppContainersContext.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/AzureResourceManagerAppContainersContext.cs @@ -18,13 +18,29 @@ namespace Azure.ResourceManager.AppContainers /// [ModelReaderWriterBuildable(typeof(AllowedAudiencesValidation))] [ModelReaderWriterBuildable(typeof(AppContainerResources))] + [ModelReaderWriterBuildable(typeof(AppInsightsConfiguration))] + [ModelReaderWriterBuildable(typeof(Models.AppResiliencyCollection))] + [ModelReaderWriterBuildable(typeof(AppResiliencyData))] + [ModelReaderWriterBuildable(typeof(AppResiliencyResource))] [ModelReaderWriterBuildable(typeof(AuthConfigCollection))] [ModelReaderWriterBuildable(typeof(AvailableWorkloadProfilesCollection))] [ModelReaderWriterBuildable(typeof(AzureStaticWebAppsRegistration))] [ModelReaderWriterBuildable(typeof(BillingMeterCollection))] [ModelReaderWriterBuildable(typeof(BlobStorageTokenStore))] + [ModelReaderWriterBuildable(typeof(BuildCollection))] + [ModelReaderWriterBuildable(typeof(BuildConfiguration))] + [ModelReaderWriterBuildable(typeof(BuilderCollection))] + [ModelReaderWriterBuildable(typeof(BuilderResource))] + [ModelReaderWriterBuildable(typeof(BuilderResourceData))] + [ModelReaderWriterBuildable(typeof(BuilderResourcePatch))] + [ModelReaderWriterBuildable(typeof(BuildResource))] + [ModelReaderWriterBuildable(typeof(BuildResourceData))] + [ModelReaderWriterBuildable(typeof(BuildToken))] [ModelReaderWriterBuildable(typeof(CertificateCollection))] + [ModelReaderWriterBuildable(typeof(CircuitBreakerPolicy))] [ModelReaderWriterBuildable(typeof(ConnectedEnvironmentCollection))] + [ModelReaderWriterBuildable(typeof(ConnectedEnvironmentDaprComponentData))] + [ModelReaderWriterBuildable(typeof(ConnectedEnvironmentDaprComponentsCollection))] [ModelReaderWriterBuildable(typeof(ConnectedEnvironmentStorageProperties))] [ModelReaderWriterBuildable(typeof(ConnectedEnvironmentStoragesCollection))] [ModelReaderWriterBuildable(typeof(ContainerAppAllowedPrincipals))] @@ -164,6 +180,7 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(ContainerAppPrivateLinkListResult))] [ModelReaderWriterBuildable(typeof(ContainerAppPrivateLinkServiceConnectionState))] [ModelReaderWriterBuildable(typeof(ContainerAppProbe))] + [ModelReaderWriterBuildable(typeof(ContainerAppPropertiesPatchingConfiguration))] [ModelReaderWriterBuildable(typeof(ContainerAppQueueScaleRule))] [ModelReaderWriterBuildable(typeof(ContainerAppRegistration))] [ModelReaderWriterBuildable(typeof(ContainerAppRegistryCredentials))] @@ -176,6 +193,10 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(ContainerAppRevisionData))] [ModelReaderWriterBuildable(typeof(ContainerAppRevisionResource))] [ModelReaderWriterBuildable(typeof(ContainerAppRevisionTrafficWeight))] + [ModelReaderWriterBuildable(typeof(ContainerAppsBuildCollection))] + [ModelReaderWriterBuildable(typeof(ContainerAppsBuildConfiguration))] + [ModelReaderWriterBuildable(typeof(ContainerAppsBuildResource))] + [ModelReaderWriterBuildable(typeof(ContainerAppsBuildResourceData))] [ModelReaderWriterBuildable(typeof(ContainerAppScale))] [ModelReaderWriterBuildable(typeof(ContainerAppScaleRule))] [ModelReaderWriterBuildable(typeof(ContainerAppScaleRuleAuth))] @@ -184,6 +205,8 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(ContainerAppServiceBind))] [ModelReaderWriterBuildable(typeof(ContainerAppSourceControlData))] [ModelReaderWriterBuildable(typeof(ContainerAppSourceControlResource))] + [ModelReaderWriterBuildable(typeof(ContainerAppsPatchResource))] + [ModelReaderWriterBuildable(typeof(ContainerAppsPatchResourceData))] [ModelReaderWriterBuildable(typeof(ContainerAppTcpScaleRule))] [ModelReaderWriterBuildable(typeof(ContainerAppTcpSocketRequestInfo))] [ModelReaderWriterBuildable(typeof(ContainerAppTemplate))] @@ -199,18 +222,55 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(ContainerAppWorkloadProfileState))] [ModelReaderWriterBuildable(typeof(ContainerAppWorkloadProfileStateProperties))] [ModelReaderWriterBuildable(typeof(ContainerAppWritableSecret))] + [ModelReaderWriterBuildable(typeof(ContainerExecutionStatus))] + [ModelReaderWriterBuildable(typeof(ContainerRegistry))] + [ModelReaderWriterBuildable(typeof(ContainerRegistryWithCustomImage))] [ModelReaderWriterBuildable(typeof(CustomContainerTemplate))] [ModelReaderWriterBuildable(typeof(DaprAppHealth))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPoliciesCollection))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPolicyConfiguration))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPolicyData))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPolicyResource))] + [ModelReaderWriterBuildable(typeof(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration))] [ModelReaderWriterBuildable(typeof(DaprComponentsCollection))] + [ModelReaderWriterBuildable(typeof(DaprComponentServiceBinding))] [ModelReaderWriterBuildable(typeof(DaprConfiguration))] [ModelReaderWriterBuildable(typeof(DaprSecretsCollection))] + [ModelReaderWriterBuildable(typeof(DaprServiceBindMetadata))] + [ModelReaderWriterBuildable(typeof(DaprSubscriptionBulkSubscribeConfig))] + [ModelReaderWriterBuildable(typeof(DaprSubscriptionData))] + [ModelReaderWriterBuildable(typeof(DaprSubscriptionResource))] + [ModelReaderWriterBuildable(typeof(DaprSubscriptionRouteRule))] + [ModelReaderWriterBuildable(typeof(DaprSubscriptionRoutes))] + [ModelReaderWriterBuildable(typeof(DaprSubscriptionsCollection))] + [ModelReaderWriterBuildable(typeof(DataDogConfiguration))] + [ModelReaderWriterBuildable(typeof(DestinationsConfiguration))] [ModelReaderWriterBuildable(typeof(DiagnosticsCollection))] + [ModelReaderWriterBuildable(typeof(DiskEncryptionConfiguration))] + [ModelReaderWriterBuildable(typeof(DiskEncryptionConfigurationKeyVaultConfiguration))] + [ModelReaderWriterBuildable(typeof(DiskEncryptionConfigurationKeyVaultConfigurationAuth))] + [ModelReaderWriterBuildable(typeof(DotNetComponentConfigurationProperty))] + [ModelReaderWriterBuildable(typeof(DotNetComponentData))] + [ModelReaderWriterBuildable(typeof(DotNetComponentResource))] + [ModelReaderWriterBuildable(typeof(DotNetComponentsCollection))] + [ModelReaderWriterBuildable(typeof(DotNetComponentServiceBind))] [ModelReaderWriterBuildable(typeof(DynamicPoolConfiguration))] [ModelReaderWriterBuildable(typeof(EncryptionSettings))] + [ModelReaderWriterBuildable(typeof(EnvironmentVariable))] [ModelReaderWriterBuildable(typeof(EventTriggerConfiguration))] + [ModelReaderWriterBuildable(typeof(ExecutionStatus))] + [ModelReaderWriterBuildable(typeof(Header))] + [ModelReaderWriterBuildable(typeof(HeaderMatch))] + [ModelReaderWriterBuildable(typeof(HttpConnectionPool))] + [ModelReaderWriterBuildable(typeof(HttpGet))] + [ModelReaderWriterBuildable(typeof(HttpRetryPolicy))] [ModelReaderWriterBuildable(typeof(HttpRouteAction))] [ModelReaderWriterBuildable(typeof(HttpRouteConfigCollection))] [ModelReaderWriterBuildable(typeof(HttpSettingsRoutes))] + [ModelReaderWriterBuildable(typeof(IngressConfigurationScale))] [ModelReaderWriterBuildable(typeof(IngressPortMapping))] [ModelReaderWriterBuildable(typeof(IngressStickySessions))] [ModelReaderWriterBuildable(typeof(JavaComponentConfigurationProperty))] @@ -226,7 +286,13 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(JobExecutionContainer))] [ModelReaderWriterBuildable(typeof(JobSecretsCollection))] [ModelReaderWriterBuildable(typeof(KedaConfiguration))] + [ModelReaderWriterBuildable(typeof(Models.LabelHistoryCollection))] + [ModelReaderWriterBuildable(typeof(LabelHistoryData))] + [ModelReaderWriterBuildable(typeof(LabelHistoryProperties))] + [ModelReaderWriterBuildable(typeof(LabelHistoryRecordItem))] + [ModelReaderWriterBuildable(typeof(LabelHistoryResource))] [ModelReaderWriterBuildable(typeof(ListUsagesResult))] + [ModelReaderWriterBuildable(typeof(LoggerSetting))] [ModelReaderWriterBuildable(typeof(LogicAppData))] [ModelReaderWriterBuildable(typeof(LogicAppResource))] [ModelReaderWriterBuildable(typeof(LogicAppWorkflowEnvelopeData))] @@ -235,6 +301,7 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(LogicAppWorkflowHealth))] [ModelReaderWriterBuildable(typeof(LoginRoutes))] [ModelReaderWriterBuildable(typeof(LoginScopes))] + [ModelReaderWriterBuildable(typeof(LogsConfiguration))] [ModelReaderWriterBuildable(typeof(MaintenanceConfigurationCollection))] [ModelReaderWriterBuildable(typeof(ManagedCertificateCollection))] [ModelReaderWriterBuildable(typeof(ManagedCertificateProperties))] @@ -247,12 +314,30 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(ManagedEnvironmentStorageProperties))] [ModelReaderWriterBuildable(typeof(ManagedEnvironmentStoragesCollection))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] + [ModelReaderWriterBuildable(typeof(McpServerCredential))] + [ModelReaderWriterBuildable(typeof(McpServerSettings))] + [ModelReaderWriterBuildable(typeof(MetricsConfiguration))] [ModelReaderWriterBuildable(typeof(Mtls))] + [ModelReaderWriterBuildable(typeof(NacosComponent))] + [ModelReaderWriterBuildable(typeof(OpenTelemetryConfiguration))] + [ModelReaderWriterBuildable(typeof(OtlpConfiguration))] + [ModelReaderWriterBuildable(typeof(PatchCollection))] + [ModelReaderWriterBuildable(typeof(PatchDetails))] + [ModelReaderWriterBuildable(typeof(PatchDetailsNewLayer))] + [ModelReaderWriterBuildable(typeof(PatchDetailsOldLayer))] + [ModelReaderWriterBuildable(typeof(PatchProperties))] + [ModelReaderWriterBuildable(typeof(PatchSkipConfig))] + [ModelReaderWriterBuildable(typeof(PreBuildStep))] [ModelReaderWriterBuildable(typeof(ReplicaCollection))] + [ModelReaderWriterBuildable(typeof(ReplicaExecutionStatus))] [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(RevisionCollection))] [ModelReaderWriterBuildable(typeof(Runtime))] + [ModelReaderWriterBuildable(typeof(RuntimeDotnet))] [ModelReaderWriterBuildable(typeof(RuntimeJava))] + [ModelReaderWriterBuildable(typeof(RuntimeJavaAgent))] + [ModelReaderWriterBuildable(typeof(RuntimeJavaAgentLogging))] + [ModelReaderWriterBuildable(typeof(ScgRoute))] [ModelReaderWriterBuildable(typeof(SecretsCollection))] [ModelReaderWriterBuildable(typeof(SecretVolumeItem))] [ModelReaderWriterBuildable(typeof(Service))] @@ -268,17 +353,30 @@ namespace Azure.ResourceManager.AppContainers [ModelReaderWriterBuildable(typeof(SessionPoolResource))] [ModelReaderWriterBuildable(typeof(SessionPoolScaleConfiguration))] [ModelReaderWriterBuildable(typeof(SessionPoolSecret))] + [ModelReaderWriterBuildable(typeof(SessionProbe))] + [ModelReaderWriterBuildable(typeof(SessionProbeHttpGet))] + [ModelReaderWriterBuildable(typeof(SessionProbeHttpGetHttpHeadersItem))] + [ModelReaderWriterBuildable(typeof(SessionProbeTcpSocket))] [ModelReaderWriterBuildable(typeof(SessionRegistryCredentials))] + [ModelReaderWriterBuildable(typeof(SmbStorage))] [ModelReaderWriterBuildable(typeof(SourceControlCollection))] [ModelReaderWriterBuildable(typeof(SpringBootAdminComponent))] [ModelReaderWriterBuildable(typeof(SpringCloudConfigComponent))] [ModelReaderWriterBuildable(typeof(SpringCloudEurekaComponent))] + [ModelReaderWriterBuildable(typeof(SpringCloudGatewayComponent))] [ModelReaderWriterBuildable(typeof(SubResource))] [ModelReaderWriterBuildable(typeof(SystemData))] + [ModelReaderWriterBuildable(typeof(TcpConnectionPool))] + [ModelReaderWriterBuildable(typeof(TcpRetryPolicy))] + [ModelReaderWriterBuildable(typeof(TemplatePoolStatus))] + [ModelReaderWriterBuildable(typeof(TemplateStatus))] + [ModelReaderWriterBuildable(typeof(TemplateUpdateStatus))] + [ModelReaderWriterBuildable(typeof(TimeoutPolicy))] + [ModelReaderWriterBuildable(typeof(TracesConfiguration))] [ModelReaderWriterBuildable(typeof(UnknownJavaComponentProperties))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] + [ModelReaderWriterBuildable(typeof(WorkflowArtifacts))] [ModelReaderWriterBuildable(typeof(WorkflowEnvelopeCollection))] - [ModelReaderWriterBuildable(typeof(WorkflowErrorEntity))] [ModelReaderWriterBuildable(typeof(WorkloadProfileStatesCollection))] public partial class AzureResourceManagerAppContainersContext : ModelReaderWriterContext { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.Serialization.cs index ce6097231265..5a6b653a5f4e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.Serialization.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - internal partial class BlobStorageTokenStore : IUtf8JsonSerializable, IJsonModel + public partial class BlobStorageTokenStore : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -35,8 +35,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(BlobStorageTokenStore)} does not support writing '{format}' format."); } - writer.WritePropertyName("sasUrlSettingName"u8); - writer.WriteStringValue(SasUrlSettingName); + if (Optional.IsDefined(SasUrlSettingName)) + { + writer.WritePropertyName("sasUrlSettingName"u8); + writer.WriteStringValue(SasUrlSettingName); + } + if (Optional.IsDefined(BlobContainerUri)) + { + writer.WritePropertyName("blobContainerUri"u8); + writer.WriteStringValue(BlobContainerUri.AbsoluteUri); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + if (Optional.IsDefined(ManagedIdentityResourceId)) + { + writer.WritePropertyName("managedIdentityResourceId"u8); + writer.WriteStringValue(ManagedIdentityResourceId); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,6 +93,9 @@ internal static BlobStorageTokenStore DeserializeBlobStorageTokenStore(JsonEleme return null; } string sasUrlSettingName = default; + Uri blobContainerUri = default; + string clientId = default; + string managedIdentityResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -84,13 +105,32 @@ internal static BlobStorageTokenStore DeserializeBlobStorageTokenStore(JsonEleme sasUrlSettingName = property.Value.GetString(); continue; } + if (property.NameEquals("blobContainerUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + blobContainerUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("managedIdentityResourceId"u8)) + { + managedIdentityResourceId = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new BlobStorageTokenStore(sasUrlSettingName, serializedAdditionalRawData); + return new BlobStorageTokenStore(sasUrlSettingName, blobContainerUri, clientId, managedIdentityResourceId, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -127,6 +167,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BlobContainerUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" blobContainerUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BlobContainerUri)) + { + builder.Append(" blobContainerUri: "); + builder.AppendLine($"'{BlobContainerUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagedIdentityResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managedIdentityResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagedIdentityResourceId)) + { + builder.Append(" managedIdentityResourceId: "); + if (ManagedIdentityResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ManagedIdentityResourceId}'''"); + } + else + { + builder.AppendLine($"'{ManagedIdentityResourceId}'"); + } + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.cs index 1654328b5c56..9364e922f3c4 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BlobStorageTokenStore.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.AppContainers.Models { /// The configuration settings of the storage of the tokens if blob storage is used. - internal partial class BlobStorageTokenStore + public partial class BlobStorageTokenStore { /// /// Keeps track of any properties unknown to the library. @@ -46,31 +46,36 @@ internal partial class BlobStorageTokenStore private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The name of the app secrets containing the SAS URL of the blob storage containing the tokens. - /// is null. - public BlobStorageTokenStore(string sasUrlSettingName) + public BlobStorageTokenStore() { - Argument.AssertNotNull(sasUrlSettingName, nameof(sasUrlSettingName)); - - SasUrlSettingName = sasUrlSettingName; } /// Initializes a new instance of . - /// 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. + /// The URI of the blob storage containing the tokens. Should not be used along with sasUrlSettingName. + /// The Client ID of a User-Assigned Managed Identity. Should not be used along with managedIdentityResourceId. + /// The Resource ID of a User-Assigned Managed Identity. Should not be used along with clientId. /// Keeps track of any properties unknown to the library. - internal BlobStorageTokenStore(string sasUrlSettingName, IDictionary serializedAdditionalRawData) + internal BlobStorageTokenStore(string sasUrlSettingName, Uri blobContainerUri, string clientId, string managedIdentityResourceId, IDictionary serializedAdditionalRawData) { SasUrlSettingName = sasUrlSettingName; + BlobContainerUri = blobContainerUri; + ClientId = clientId; + ManagedIdentityResourceId = managedIdentityResourceId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal BlobStorageTokenStore() - { - } - - /// 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. [WirePath("sasUrlSettingName")] public string SasUrlSettingName { get; set; } + /// The URI of the blob storage containing the tokens. Should not be used along with sasUrlSettingName. + [WirePath("blobContainerUri")] + public Uri BlobContainerUri { get; set; } + /// The Client ID of a User-Assigned Managed Identity. Should not be used along with managedIdentityResourceId. + [WirePath("clientId")] + public string ClientId { get; set; } + /// The Resource ID of a User-Assigned Managed Identity. Should not be used along with clientId. + [WirePath("managedIdentityResourceId")] + public string ManagedIdentityResourceId { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildCollection.Serialization.cs new file mode 100644 index 000000000000..185552073936 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildCollection.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class BuildCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BuildCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBuildCollection(document.RootElement, options); + } + + internal static BuildCollection DeserializeBuildCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuildResourceData.DeserializeBuildResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BuildCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BuildCollection)} does not support writing '{options.Format}' format."); + } + } + + BuildCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBuildCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BuildCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildCollection.cs new file mode 100644 index 000000000000..aa854ec5f300 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The response of a BuildResource list operation. + internal partial class BuildCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The BuildResource items on this page. + /// is null. + internal BuildCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The BuildResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal BuildCollection(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BuildCollection() + { + } + + /// The BuildResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildConfiguration.Serialization.cs new file mode 100644 index 000000000000..28c97dc43d2b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildConfiguration.Serialization.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class BuildConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(BaseOS)) + { + writer.WritePropertyName("baseOs"u8); + writer.WriteStringValue(BaseOS); + } + if (Optional.IsDefined(Platform)) + { + writer.WritePropertyName("platform"u8); + writer.WriteStringValue(Platform); + } + if (Optional.IsDefined(PlatformVersion)) + { + writer.WritePropertyName("platformVersion"u8); + writer.WriteStringValue(PlatformVersion); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentVariables) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PreBuildSteps)) + { + writer.WritePropertyName("preBuildSteps"u8); + writer.WriteStartArray(); + foreach (var item in PreBuildSteps) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BuildConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBuildConfiguration(document.RootElement, options); + } + + internal static BuildConfiguration DeserializeBuildConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string baseOS = default; + string platform = default; + string platformVersion = default; + IList environmentVariables = default; + IList preBuildSteps = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseOs"u8)) + { + baseOS = property.Value.GetString(); + continue; + } + if (property.NameEquals("platform"u8)) + { + platform = property.Value.GetString(); + continue; + } + if (property.NameEquals("platformVersion"u8)) + { + platformVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentVariable.DeserializeEnvironmentVariable(item, options)); + } + environmentVariables = array; + continue; + } + if (property.NameEquals("preBuildSteps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PreBuildStep.DeserializePreBuildStep(item, options)); + } + preBuildSteps = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BuildConfiguration( + baseOS, + platform, + platformVersion, + environmentVariables ?? new ChangeTrackingList(), + preBuildSteps ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BaseOS), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" baseOs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BaseOS)) + { + builder.Append(" baseOs: "); + if (BaseOS.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BaseOS}'''"); + } + else + { + builder.AppendLine($"'{BaseOS}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Platform), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platform: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Platform)) + { + builder.Append(" platform: "); + if (Platform.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Platform}'''"); + } + else + { + builder.AppendLine($"'{Platform}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + if (PlatformVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PlatformVersion}'''"); + } + else + { + builder.AppendLine($"'{PlatformVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentVariables), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environmentVariables: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables.Any()) + { + builder.Append(" environmentVariables: "); + builder.AppendLine("["); + foreach (var item in EnvironmentVariables) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " environmentVariables: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PreBuildSteps), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" preBuildSteps: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PreBuildSteps)) + { + if (PreBuildSteps.Any()) + { + builder.Append(" preBuildSteps: "); + builder.AppendLine("["); + foreach (var item in PreBuildSteps) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " preBuildSteps: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BuildConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BuildConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBuildConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BuildConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildConfiguration.cs new file mode 100644 index 000000000000..b6fafce26f87 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of the build. + public partial class BuildConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BuildConfiguration() + { + EnvironmentVariables = new ChangeTrackingList(); + PreBuildSteps = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Base OS used to build and run the app. + /// Platform to be used to build and run the app. + /// Platform version to be used to build and run the app. + /// List of environment variables to be passed to the build, secrets should not be used in environment variable. + /// List of steps to perform before the build. + /// Keeps track of any properties unknown to the library. + internal BuildConfiguration(string baseOS, string platform, string platformVersion, IList environmentVariables, IList preBuildSteps, IDictionary serializedAdditionalRawData) + { + BaseOS = baseOS; + Platform = platform; + PlatformVersion = platformVersion; + EnvironmentVariables = environmentVariables; + PreBuildSteps = preBuildSteps; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Base OS used to build and run the app. + [WirePath("baseOs")] + public string BaseOS { get; set; } + /// Platform to be used to build and run the app. + [WirePath("platform")] + public string Platform { get; set; } + /// Platform version to be used to build and run the app. + [WirePath("platformVersion")] + public string PlatformVersion { get; set; } + /// List of environment variables to be passed to the build, secrets should not be used in environment variable. + [WirePath("environmentVariables")] + public IList EnvironmentVariables { get; } + /// List of steps to perform before the build. + [WirePath("preBuildSteps")] + public IList PreBuildSteps { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildProvisioningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildProvisioningState.cs new file mode 100644 index 000000000000..9901fa60f2a1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Resource instance provisioning state. + public readonly partial struct BuildProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuildProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + + /// Succeeded. + public static BuildProvisioningState Succeeded { get; } = new BuildProvisioningState(SucceededValue); + /// Failed. + public static BuildProvisioningState Failed { get; } = new BuildProvisioningState(FailedValue); + /// Canceled. + public static BuildProvisioningState Canceled { get; } = new BuildProvisioningState(CanceledValue); + /// Creating. + public static BuildProvisioningState Creating { get; } = new BuildProvisioningState(CreatingValue); + /// Updating. + public static BuildProvisioningState Updating { get; } = new BuildProvisioningState(UpdatingValue); + /// Deleting. + public static BuildProvisioningState Deleting { get; } = new BuildProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BuildProvisioningState left, BuildProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuildProvisioningState left, BuildProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BuildProvisioningState(string value) => new BuildProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuildProvisioningState other && Equals(other); + /// + public bool Equals(BuildProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildStatus.cs new file mode 100644 index 000000000000..5c8578fee8d4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Status of the build once it has been provisioned. + public readonly partial struct BuildStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuildStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string InProgressValue = "InProgress"; + private const string SucceededValue = "Succeeded"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + + /// NotStarted. + public static BuildStatus NotStarted { get; } = new BuildStatus(NotStartedValue); + /// InProgress. + public static BuildStatus InProgress { get; } = new BuildStatus(InProgressValue); + /// Succeeded. + public static BuildStatus Succeeded { get; } = new BuildStatus(SucceededValue); + /// Canceled. + public static BuildStatus Canceled { get; } = new BuildStatus(CanceledValue); + /// Failed. + public static BuildStatus Failed { get; } = new BuildStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(BuildStatus left, BuildStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuildStatus left, BuildStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BuildStatus(string value) => new BuildStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuildStatus other && Equals(other); + /// + public bool Equals(BuildStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildToken.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildToken.Serialization.cs new file mode 100644 index 000000000000..bb78281c85af --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildToken.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class BuildToken : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildToken)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Token)) + { + writer.WritePropertyName("token"u8); + writer.WriteStringValue(Token); + } + if (options.Format != "W" && Optional.IsDefined(Expires)) + { + writer.WritePropertyName("expires"u8); + writer.WriteStringValue(Expires.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BuildToken IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuildToken)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBuildToken(document.RootElement, options); + } + + internal static BuildToken DeserializeBuildToken(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string token = default; + DateTimeOffset? expires = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("token"u8)) + { + token = property.Value.GetString(); + continue; + } + if (property.NameEquals("expires"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expires = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BuildToken(token, expires, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Token), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" token: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Token)) + { + builder.Append(" token: "); + if (Token.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Token}'''"); + } + else + { + builder.AppendLine($"'{Token}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Expires), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expires: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Expires)) + { + builder.Append(" expires: "); + var formattedDateTimeString = TypeFormatters.ToString(Expires.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BuildToken)} does not support writing '{options.Format}' format."); + } + } + + BuildToken IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBuildToken(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BuildToken)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildToken.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildToken.cs new file mode 100644 index 000000000000..f6bddfefb50f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuildToken.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Build Auth Token. + public partial class BuildToken + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BuildToken() + { + } + + /// Initializes a new instance of . + /// Authentication token. + /// Token expiration date. + /// Keeps track of any properties unknown to the library. + internal BuildToken(string token, DateTimeOffset? expires, IDictionary serializedAdditionalRawData) + { + Token = token; + Expires = expires; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Authentication token. + [WirePath("token")] + public string Token { get; } + /// Token expiration date. + [WirePath("expires")] + public DateTimeOffset? Expires { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderCollection.Serialization.cs new file mode 100644 index 000000000000..9490a6208fd9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderCollection.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class BuilderCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuilderCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BuilderCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuilderCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBuilderCollection(document.RootElement, options); + } + + internal static BuilderCollection DeserializeBuilderCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BuilderResourceData.DeserializeBuilderResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BuilderCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BuilderCollection)} does not support writing '{options.Format}' format."); + } + } + + BuilderCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBuilderCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BuilderCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderCollection.cs new file mode 100644 index 000000000000..47a971a36352 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The response of a BuilderResource list operation. + internal partial class BuilderCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The BuilderResource items on this page. + /// is null. + internal BuilderCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The BuilderResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal BuilderCollection(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BuilderCollection() + { + } + + /// The BuilderResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderProvisioningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderProvisioningState.cs new file mode 100644 index 000000000000..24fba3e9efa3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Resource instance provisioning state. + public readonly partial struct BuilderProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BuilderProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + + /// Succeeded. + public static BuilderProvisioningState Succeeded { get; } = new BuilderProvisioningState(SucceededValue); + /// Failed. + public static BuilderProvisioningState Failed { get; } = new BuilderProvisioningState(FailedValue); + /// Canceled. + public static BuilderProvisioningState Canceled { get; } = new BuilderProvisioningState(CanceledValue); + /// Creating. + public static BuilderProvisioningState Creating { get; } = new BuilderProvisioningState(CreatingValue); + /// Updating. + public static BuilderProvisioningState Updating { get; } = new BuilderProvisioningState(UpdatingValue); + /// Deleting. + public static BuilderProvisioningState Deleting { get; } = new BuilderProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BuilderProvisioningState left, BuilderProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BuilderProvisioningState left, BuilderProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BuilderProvisioningState(string value) => new BuilderProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BuilderProvisioningState other && Equals(other); + /// + public bool Equals(BuilderProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderResourcePatch.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderResourcePatch.Serialization.cs new file mode 100644 index 000000000000..38cef4d948db --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderResourcePatch.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class BuilderResourcePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuilderResourcePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"u8); + writer.WriteStringValue(EnvironmentId); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BuilderResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BuilderResourcePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBuilderResourcePatch(document.RootElement, options); + } + + internal static BuilderResourcePatch DeserializeBuilderResourcePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentity identity = default; + IDictionary tags = default; + ResourceIdentifier environmentId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerAppContainersContext.Default); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("environmentId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + environmentId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BuilderResourcePatch(identity, tags ?? new ChangeTrackingDictionary(), environmentId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + default: + throw new FormatException($"The model {nameof(BuilderResourcePatch)} does not support writing '{options.Format}' format."); + } + } + + BuilderResourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBuilderResourcePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BuilderResourcePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderResourcePatch.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderResourcePatch.cs new file mode 100644 index 000000000000..91e42761960a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/BuilderResourcePatch.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The type used for update operations of the BuilderResource. + public partial class BuilderResourcePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BuilderResourcePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The managed service identities assigned to this resource. + /// Resource tags. + /// Resource ID of the container apps environment that the builder is associated with. + /// Keeps track of any properties unknown to the library. + internal BuilderResourcePatch(ManagedServiceIdentity identity, IDictionary tags, ResourceIdentifier environmentId, IDictionary serializedAdditionalRawData) + { + Identity = identity; + Tags = tags; + EnvironmentId = environmentId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The managed service identities assigned to this resource. + [WirePath("identity")] + public ManagedServiceIdentity Identity { get; set; } + /// Resource tags. + [WirePath("tags")] + public IDictionary Tags { get; } + /// Resource ID of the container apps environment that the builder is associated with. + [WirePath("properties.environmentId")] + public ResourceIdentifier EnvironmentId { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CertificateType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CertificateType.cs new file mode 100644 index 000000000000..97a1d2cac42e --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CertificateType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA`. + public readonly partial struct CertificateType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CertificateType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServerSSLCertificateValue = "ServerSSLCertificate"; + private const string ImagePullTrustedCAValue = "ImagePullTrustedCA"; + + /// ServerSSLCertificate. + public static CertificateType ServerSSLCertificate { get; } = new CertificateType(ServerSSLCertificateValue); + /// ImagePullTrustedCA. + public static CertificateType ImagePullTrustedCA { get; } = new CertificateType(ImagePullTrustedCAValue); + /// Determines if two values are the same. + public static bool operator ==(CertificateType left, CertificateType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CertificateType left, CertificateType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CertificateType(string value) => new CertificateType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CertificateType other && Equals(other); + /// + public bool Equals(CertificateType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CircuitBreakerPolicy.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CircuitBreakerPolicy.Serialization.cs new file mode 100644 index 000000000000..b8c026d5f8ae --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CircuitBreakerPolicy.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class CircuitBreakerPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CircuitBreakerPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConsecutiveErrors)) + { + writer.WritePropertyName("consecutiveErrors"u8); + writer.WriteNumberValue(ConsecutiveErrors.Value); + } + if (Optional.IsDefined(IntervalInSeconds)) + { + writer.WritePropertyName("intervalInSeconds"u8); + writer.WriteNumberValue(IntervalInSeconds.Value); + } + if (Optional.IsDefined(MaxEjectionPercent)) + { + writer.WritePropertyName("maxEjectionPercent"u8); + writer.WriteNumberValue(MaxEjectionPercent.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CircuitBreakerPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CircuitBreakerPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCircuitBreakerPolicy(document.RootElement, options); + } + + internal static CircuitBreakerPolicy DeserializeCircuitBreakerPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? consecutiveErrors = default; + int? intervalInSeconds = default; + int? maxEjectionPercent = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("consecutiveErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + consecutiveErrors = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("intervalInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + intervalInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxEjectionPercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxEjectionPercent = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CircuitBreakerPolicy(consecutiveErrors, intervalInSeconds, maxEjectionPercent, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConsecutiveErrors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" consecutiveErrors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConsecutiveErrors)) + { + builder.Append(" consecutiveErrors: "); + builder.AppendLine($"{ConsecutiveErrors.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntervalInSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" intervalInSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntervalInSeconds)) + { + builder.Append(" intervalInSeconds: "); + builder.AppendLine($"{IntervalInSeconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxEjectionPercent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxEjectionPercent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxEjectionPercent)) + { + builder.Append(" maxEjectionPercent: "); + builder.AppendLine($"{MaxEjectionPercent.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CircuitBreakerPolicy)} does not support writing '{options.Format}' format."); + } + } + + CircuitBreakerPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCircuitBreakerPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CircuitBreakerPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CircuitBreakerPolicy.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CircuitBreakerPolicy.cs new file mode 100644 index 000000000000..29ced0c63f1a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/CircuitBreakerPolicy.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Policy that defines circuit breaker conditions. + public partial class CircuitBreakerPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CircuitBreakerPolicy() + { + } + + /// Initializes a new instance of . + /// Number of consecutive errors before the circuit breaker opens. + /// The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s. + /// Maximum percentage of hosts that will be ejected after failure threshold has been met. + /// Keeps track of any properties unknown to the library. + internal CircuitBreakerPolicy(int? consecutiveErrors, int? intervalInSeconds, int? maxEjectionPercent, IDictionary serializedAdditionalRawData) + { + ConsecutiveErrors = consecutiveErrors; + IntervalInSeconds = intervalInSeconds; + MaxEjectionPercent = maxEjectionPercent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Number of consecutive errors before the circuit breaker opens. + [WirePath("consecutiveErrors")] + public int? ConsecutiveErrors { get; set; } + /// The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s. + [WirePath("intervalInSeconds")] + public int? IntervalInSeconds { get; set; } + /// Maximum percentage of hosts that will be ejected after failure threshold has been met. + [WirePath("maxEjectionPercent")] + public int? MaxEjectionPercent { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentProvisioningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentProvisioningState.cs new file mode 100644 index 000000000000..1181f195c6f0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Provisioning state of the Connected Environment Dapr Component. + public readonly partial struct ConnectedEnvironmentDaprComponentProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConnectedEnvironmentDaprComponentProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string InProgressValue = "InProgress"; + private const string DeletingValue = "Deleting"; + + /// Succeeded. + public static ConnectedEnvironmentDaprComponentProvisioningState Succeeded { get; } = new ConnectedEnvironmentDaprComponentProvisioningState(SucceededValue); + /// Failed. + public static ConnectedEnvironmentDaprComponentProvisioningState Failed { get; } = new ConnectedEnvironmentDaprComponentProvisioningState(FailedValue); + /// Canceled. + public static ConnectedEnvironmentDaprComponentProvisioningState Canceled { get; } = new ConnectedEnvironmentDaprComponentProvisioningState(CanceledValue); + /// InProgress. + public static ConnectedEnvironmentDaprComponentProvisioningState InProgress { get; } = new ConnectedEnvironmentDaprComponentProvisioningState(InProgressValue); + /// Deleting. + public static ConnectedEnvironmentDaprComponentProvisioningState Deleting { get; } = new ConnectedEnvironmentDaprComponentProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ConnectedEnvironmentDaprComponentProvisioningState left, ConnectedEnvironmentDaprComponentProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConnectedEnvironmentDaprComponentProvisioningState left, ConnectedEnvironmentDaprComponentProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConnectedEnvironmentDaprComponentProvisioningState(string value) => new ConnectedEnvironmentDaprComponentProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConnectedEnvironmentDaprComponentProvisioningState other && Equals(other); + /// + public bool Equals(ConnectedEnvironmentDaprComponentProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentsCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentsCollection.Serialization.cs new file mode 100644 index 000000000000..e0adef5e20b4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentsCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class ConnectedEnvironmentDaprComponentsCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentsCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectedEnvironmentDaprComponentsCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentsCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedEnvironmentDaprComponentsCollection(document.RootElement, options); + } + + internal static ConnectedEnvironmentDaprComponentsCollection DeserializeConnectedEnvironmentDaprComponentsCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConnectedEnvironmentDaprComponentData.DeserializeConnectedEnvironmentDaprComponentData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedEnvironmentDaprComponentsCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentsCollection)} does not support writing '{options.Format}' format."); + } + } + + ConnectedEnvironmentDaprComponentsCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectedEnvironmentDaprComponentsCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedEnvironmentDaprComponentsCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentsCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentsCollection.cs new file mode 100644 index 000000000000..b066696d50e6 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentDaprComponentsCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Collection of Dapr Components for Environments. + internal partial class ConnectedEnvironmentDaprComponentsCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of Dapr component resources. + /// is null. + internal ConnectedEnvironmentDaprComponentsCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of Dapr component resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal ConnectedEnvironmentDaprComponentsCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConnectedEnvironmentDaprComponentsCollection() + { + } + + /// Collection of Dapr component resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.Serialization.cs index 1e867432dbc2..399f9bd9fbf5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.Serialization.cs @@ -35,11 +35,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConnectedEnvironmentStorageProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(AzureFile)) - { - writer.WritePropertyName("azureFile"u8); - writer.WriteObjectValue(AzureFile, options); - } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -50,6 +45,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("deploymentErrors"u8); writer.WriteStringValue(DeploymentErrors); } + if (Optional.IsDefined(AzureFile)) + { + writer.WritePropertyName("azureFile"u8); + writer.WriteObjectValue(AzureFile, options); + } + if (Optional.IsDefined(Smb)) + { + writer.WritePropertyName("smb"u8); + writer.WriteObjectValue(Smb, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -87,34 +92,44 @@ internal static ConnectedEnvironmentStorageProperties DeserializeConnectedEnviro { return null; } - ContainerAppAzureFileProperties azureFile = default; ConnectedEnvironmentStorageProvisioningState? provisioningState = default; string deploymentErrors = default; + ContainerAppAzureFileProperties azureFile = default; + SmbStorage smb = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("azureFile"u8)) + if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - azureFile = ContainerAppAzureFileProperties.DeserializeContainerAppAzureFileProperties(property.Value, options); + provisioningState = new ConnectedEnvironmentStorageProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("provisioningState"u8)) + if (property.NameEquals("deploymentErrors"u8)) + { + deploymentErrors = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureFile"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ConnectedEnvironmentStorageProvisioningState(property.Value.GetString()); + azureFile = ContainerAppAzureFileProperties.DeserializeContainerAppAzureFileProperties(property.Value, options); continue; } - if (property.NameEquals("deploymentErrors"u8)) + if (property.NameEquals("smb"u8)) { - deploymentErrors = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smb = SmbStorage.DeserializeSmbStorage(property.Value, options); continue; } if (options.Format != "W") @@ -123,7 +138,7 @@ internal static ConnectedEnvironmentStorageProperties DeserializeConnectedEnviro } } serializedAdditionalRawData = rawDataDictionary; - return new ConnectedEnvironmentStorageProperties(azureFile, provisioningState, deploymentErrors, serializedAdditionalRawData); + return new ConnectedEnvironmentStorageProperties(provisioningState, deploymentErrors, azureFile, smb, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -137,21 +152,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureFile), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" azureFile: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(AzureFile)) - { - builder.Append(" azureFile: "); - BicepSerializationHelpers.AppendChildObject(builder, AzureFile, options, 2, false, " azureFile: "); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); if (hasPropertyOverride) { @@ -190,6 +190,36 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureFile), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureFile: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureFile)) + { + builder.Append(" azureFile: "); + BicepSerializationHelpers.AppendChildObject(builder, AzureFile, options, 2, false, " azureFile: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Smb), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" smb: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Smb)) + { + builder.Append(" smb: "); + BicepSerializationHelpers.AppendChildObject(builder, Smb, options, 2, false, " smb: "); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.cs index bf2c2c761a82..40ed996ec8db 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ConnectedEnvironmentStorageProperties.cs @@ -51,26 +51,31 @@ public ConnectedEnvironmentStorageProperties() } /// Initializes a new instance of . - /// Azure file properties. /// Provisioning state of the storage. /// Any errors that occurred during deployment or deployment validation. + /// Azure file properties. + /// SMB storage properties. /// Keeps track of any properties unknown to the library. - internal ConnectedEnvironmentStorageProperties(ContainerAppAzureFileProperties azureFile, ConnectedEnvironmentStorageProvisioningState? provisioningState, string deploymentErrors, IDictionary serializedAdditionalRawData) + internal ConnectedEnvironmentStorageProperties(ConnectedEnvironmentStorageProvisioningState? provisioningState, string deploymentErrors, ContainerAppAzureFileProperties azureFile, SmbStorage smb, IDictionary serializedAdditionalRawData) { - AzureFile = azureFile; ProvisioningState = provisioningState; DeploymentErrors = deploymentErrors; + AzureFile = azureFile; + Smb = smb; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Azure file properties. - [WirePath("azureFile")] - public ContainerAppAzureFileProperties AzureFile { get; set; } /// Provisioning state of the storage. [WirePath("provisioningState")] public ConnectedEnvironmentStorageProvisioningState? ProvisioningState { get; } /// Any errors that occurred during deployment or deployment validation. [WirePath("deploymentErrors")] public string DeploymentErrors { get; } + /// Azure file properties. + [WirePath("azureFile")] + public ContainerAppAzureFileProperties AzureFile { get; set; } + /// SMB storage properties. + [WirePath("smb")] + public SmbStorage Smb { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppActiveRevisionsMode.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppActiveRevisionsMode.cs index ee72bd48c807..7357a051a451 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppActiveRevisionsMode.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppActiveRevisionsMode.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.AppContainers.Models { /// /// 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 readonly partial struct ContainerAppActiveRevisionsMode : IEquatable { @@ -27,11 +27,14 @@ public ContainerAppActiveRevisionsMode(string value) private const string MultipleValue = "Multiple"; private const string SingleValue = "Single"; + private const string LabelsValue = "Labels"; /// Multiple. public static ContainerAppActiveRevisionsMode Multiple { get; } = new ContainerAppActiveRevisionsMode(MultipleValue); /// Single. public static ContainerAppActiveRevisionsMode Single { get; } = new ContainerAppActiveRevisionsMode(SingleValue); + /// Labels. + public static ContainerAppActiveRevisionsMode Labels { get; } = new ContainerAppActiveRevisionsMode(LabelsValue); /// Determines if two values are the same. public static bool operator ==(ContainerAppActiveRevisionsMode left, ContainerAppActiveRevisionsMode right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.Serialization.cs index a854b4fc81bb..f02541bdab4d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.Serialization.cs @@ -41,6 +41,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("image"u8); writer.WriteStringValue(Image); } + if (Optional.IsDefined(ImageType)) + { + writer.WritePropertyName("imageType"u8); + writer.WriteStringValue(ImageType.Value.ToString()); + } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -129,6 +134,7 @@ internal static ContainerAppBaseContainer DeserializeContainerAppBaseContainer(J return null; } string image = default; + ImageType? imageType = default; string name = default; IList command = default; IList args = default; @@ -144,6 +150,15 @@ internal static ContainerAppBaseContainer DeserializeContainerAppBaseContainer(J image = property.Value.GetString(); continue; } + if (property.NameEquals("imageType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageType = new ImageType(property.Value.GetString()); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); @@ -222,6 +237,7 @@ internal static ContainerAppBaseContainer DeserializeContainerAppBaseContainer(J serializedAdditionalRawData = rawDataDictionary; return new ContainerAppBaseContainer( image, + imageType, name, command ?? new ChangeTrackingList(), args ?? new ChangeTrackingList(), @@ -265,6 +281,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ImageType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" imageType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ImageType)) + { + builder.Append(" imageType: "); + builder.AppendLine($"'{ImageType.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.cs index 5b9c048fdc02..8ae5568e2c3d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBaseContainer.cs @@ -56,6 +56,7 @@ public ContainerAppBaseContainer() /// Initializes a new instance of . /// Container image tag. + /// The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update image through image field. Set to ContainerImage for user provided image. /// Custom container name. /// Container start command. /// Container start command arguments. @@ -63,9 +64,10 @@ public ContainerAppBaseContainer() /// Container resource requirements. /// Container volume mounts. /// Keeps track of any properties unknown to the library. - internal ContainerAppBaseContainer(string image, string name, IList command, IList args, IList env, AppContainerResources resources, IList volumeMounts, IDictionary serializedAdditionalRawData) + internal ContainerAppBaseContainer(string image, ImageType? imageType, string name, IList command, IList args, IList env, AppContainerResources resources, IList volumeMounts, IDictionary serializedAdditionalRawData) { Image = image; + ImageType = imageType; Name = name; Command = command; Args = args; @@ -78,6 +80,9 @@ internal ContainerAppBaseContainer(string image, string name, IList comm /// Container image tag. [WirePath("image")] public string Image { get; set; } + /// The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update image through image field. Set to ContainerImage for user provided image. + [WirePath("imageType")] + public ImageType? ImageType { get; set; } /// Custom container name. [WirePath("name")] public string Name { get; set; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs index fb1cafe2405a..bef8308390e9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeter.cs @@ -48,7 +48,7 @@ public partial class ContainerAppBillingMeter : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public ContainerAppBillingMeter() + internal ContainerAppBillingMeter() { } @@ -69,9 +69,9 @@ internal ContainerAppBillingMeter(ResourceIdentifier id, string name, ResourceTy /// Region for the billing meter. [WirePath("location")] - public AzureLocation? Location { get; set; } + public AzureLocation? Location { get; } /// Revision resource specific properties. [WirePath("properties")] - public ContainerAppBillingMeterProperties Properties { get; set; } + public ContainerAppBillingMeterProperties Properties { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs index 9c184abe179a..3a80c643b4bd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppBillingMeterProperties.cs @@ -46,7 +46,7 @@ public partial class ContainerAppBillingMeterProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public ContainerAppBillingMeterProperties() + internal ContainerAppBillingMeterProperties() { } @@ -65,12 +65,12 @@ internal ContainerAppBillingMeterProperties(string workloadProfileCategory, stri /// Used to categorize billing meters. [WirePath("category")] - public string WorkloadProfileCategory { get; set; } + public string WorkloadProfileCategory { get; } /// Billing meter type. [WirePath("meterType")] - public string MeterType { get; set; } + public string MeterType { get; } /// The everyday name of the billing meter. [WirePath("displayName")] - public string DisplayName { get; set; } + public string DisplayName { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.Serialization.cs index 1e079c1e2065..b2e1f6968380 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.Serialization.cs @@ -106,6 +106,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("publicKeyHash"u8); writer.WriteStringValue(PublicKeyHash); } + if (Optional.IsDefined(CertificateType)) + { + writer.WritePropertyName("certificateType"u8); + writer.WriteStringValue(CertificateType.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -156,6 +161,7 @@ internal static ContainerAppCertificateProperties DeserializeContainerAppCertifi string thumbprint = default; bool? valid = default; string publicKeyHash = default; + CertificateType? certificateType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -258,6 +264,15 @@ internal static ContainerAppCertificateProperties DeserializeContainerAppCertifi publicKeyHash = property.Value.GetString(); continue; } + if (property.NameEquals("certificateType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certificateType = new CertificateType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -278,6 +293,7 @@ internal static ContainerAppCertificateProperties DeserializeContainerAppCertifi thumbprint, valid, publicKeyHash, + certificateType, serializedAdditionalRawData); } @@ -559,6 +575,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateType)) + { + builder.Append(" certificateType: "); + builder.AppendLine($"'{CertificateType.Value.ToString()}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs index efdd52a67f4c..80ed6e9db624 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppCertificateProperties.cs @@ -65,8 +65,9 @@ public ContainerAppCertificateProperties() /// Certificate thumbprint. /// Is the certificate valid?. /// Public key hash. + /// The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA`. /// Keeps track of any properties unknown to the library. - internal ContainerAppCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState, string deploymentErrors, ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, IReadOnlyList subjectAlternativeNames, byte[] value, string issuer, DateTimeOffset? issueOn, DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash, IDictionary serializedAdditionalRawData) + internal ContainerAppCertificateProperties(ContainerAppCertificateProvisioningState? provisioningState, string deploymentErrors, ContainerAppCertificateKeyVaultProperties certificateKeyVaultProperties, string password, string subjectName, IReadOnlyList subjectAlternativeNames, byte[] value, string issuer, DateTimeOffset? issueOn, DateTimeOffset? expireOn, string thumbprint, bool? isValid, string publicKeyHash, CertificateType? certificateType, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; DeploymentErrors = deploymentErrors; @@ -81,6 +82,7 @@ internal ContainerAppCertificateProperties(ContainerAppCertificateProvisioningSt Thumbprint = thumbprint; IsValid = isValid; PublicKeyHash = publicKeyHash; + CertificateType = certificateType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -123,5 +125,8 @@ internal ContainerAppCertificateProperties(ContainerAppCertificateProvisioningSt /// Public key hash. [WirePath("publicKeyHash")] public string PublicKeyHash { get; } + /// The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA`. + [WirePath("certificateType")] + public CertificateType? CertificateType { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs index 3b29d93db720..ae66a2601f63 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.Serialization.cs @@ -51,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("activeRevisionsMode"u8); writer.WriteStringValue(ActiveRevisionsMode.Value.ToString()); } + if (Optional.IsDefined(TargetLabel)) + { + writer.WritePropertyName("targetLabel"u8); + writer.WriteStringValue(TargetLabel); + } if (Optional.IsDefined(Ingress)) { writer.WritePropertyName("ingress"u8); @@ -81,6 +86,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("maxInactiveRevisions"u8); writer.WriteNumberValue(MaxInactiveRevisions.Value); } + if (Optional.IsDefined(RevisionTransitionThreshold)) + { + writer.WritePropertyName("revisionTransitionThreshold"u8); + writer.WriteNumberValue(RevisionTransitionThreshold.Value); + } if (Optional.IsDefined(Service)) { writer.WritePropertyName("service"u8); @@ -135,11 +145,13 @@ internal static ContainerAppConfiguration DeserializeContainerAppConfiguration(J } IList secrets = default; ContainerAppActiveRevisionsMode? activeRevisionsMode = default; + string targetLabel = default; ContainerAppIngressConfiguration ingress = default; IList registries = default; ContainerAppDaprConfiguration dapr = default; Runtime runtime = default; int? maxInactiveRevisions = default; + int? revisionTransitionThreshold = default; Service service = default; IList identitySettings = default; IDictionary serializedAdditionalRawData = default; @@ -169,6 +181,11 @@ internal static ContainerAppConfiguration DeserializeContainerAppConfiguration(J activeRevisionsMode = new ContainerAppActiveRevisionsMode(property.Value.GetString()); continue; } + if (property.NameEquals("targetLabel"u8)) + { + targetLabel = property.Value.GetString(); + continue; + } if (property.NameEquals("ingress"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -219,6 +236,15 @@ internal static ContainerAppConfiguration DeserializeContainerAppConfiguration(J maxInactiveRevisions = property.Value.GetInt32(); continue; } + if (property.NameEquals("revisionTransitionThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + revisionTransitionThreshold = property.Value.GetInt32(); + continue; + } if (property.NameEquals("service"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -251,11 +277,13 @@ internal static ContainerAppConfiguration DeserializeContainerAppConfiguration(J return new ContainerAppConfiguration( secrets ?? new ChangeTrackingList(), activeRevisionsMode, + targetLabel, ingress, registries ?? new ChangeTrackingList(), dapr, runtime, maxInactiveRevisions, + revisionTransitionThreshold, service, identitySettings ?? new ChangeTrackingList(), serializedAdditionalRawData); @@ -310,6 +338,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetLabel), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetLabel: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetLabel)) + { + builder.Append(" targetLabel: "); + if (TargetLabel.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetLabel}'''"); + } + else + { + builder.AppendLine($"'{TargetLabel}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Ingress), out propertyOverride); if (hasPropertyOverride) { @@ -363,16 +414,11 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("EnableMetrics", out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Runtime), out propertyOverride); if (hasPropertyOverride) { builder.Append(" runtime: "); - builder.AppendLine("{"); - builder.AppendLine(" java: {"); - builder.Append(" enableMetrics: "); builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); - builder.AppendLine(" }"); } else { @@ -398,6 +444,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RevisionTransitionThreshold), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" revisionTransitionThreshold: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RevisionTransitionThreshold)) + { + builder.Append(" revisionTransitionThreshold: "); + builder.AppendLine($"{RevisionTransitionThreshold.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("ServiceType", out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs index 9a3631a019b7..231b093dc910 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppConfiguration.cs @@ -57,25 +57,29 @@ public ContainerAppConfiguration() /// Collection of secrets used by a Container app. /// /// 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> /// + /// Required in labels revisions mode. Label to apply to newly created revision. /// Ingress configurations. /// Collection of private container registry credentials for containers used by the Container app. /// Dapr configuration for the Container App. /// App runtime configuration for the Container App. /// Optional. Max inactive revisions a Container App can have. + /// 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. /// Container App to be a dev Container App Service. /// Optional settings for Managed Identities that are assigned to the Container App. If a Managed Identity is not specified here, default settings will be used. /// Keeps track of any properties unknown to the library. - internal ContainerAppConfiguration(IList secrets, ContainerAppActiveRevisionsMode? activeRevisionsMode, ContainerAppIngressConfiguration ingress, IList registries, ContainerAppDaprConfiguration dapr, Runtime runtime, int? maxInactiveRevisions, Service service, IList identitySettings, IDictionary serializedAdditionalRawData) + internal ContainerAppConfiguration(IList secrets, ContainerAppActiveRevisionsMode? activeRevisionsMode, string targetLabel, ContainerAppIngressConfiguration ingress, IList registries, ContainerAppDaprConfiguration dapr, Runtime runtime, int? maxInactiveRevisions, int? revisionTransitionThreshold, Service service, IList identitySettings, IDictionary serializedAdditionalRawData) { Secrets = secrets; ActiveRevisionsMode = activeRevisionsMode; + TargetLabel = targetLabel; Ingress = ingress; Registries = registries; Dapr = dapr; Runtime = runtime; MaxInactiveRevisions = maxInactiveRevisions; + RevisionTransitionThreshold = revisionTransitionThreshold; Service = service; IdentitySettings = identitySettings; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -86,10 +90,13 @@ internal ContainerAppConfiguration(IList secrets, Co public IList Secrets { get; } /// /// 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> /// [WirePath("activeRevisionsMode")] public ContainerAppActiveRevisionsMode? ActiveRevisionsMode { get; set; } + /// Required in labels revisions mode. Label to apply to newly created revision. + [WirePath("targetLabel")] + public string TargetLabel { get; set; } /// Ingress configurations. [WirePath("ingress")] public ContainerAppIngressConfiguration Ingress { get; set; } @@ -100,23 +107,14 @@ internal ContainerAppConfiguration(IList secrets, Co [WirePath("dapr")] public ContainerAppDaprConfiguration Dapr { get; set; } /// App runtime configuration for the Container App. - internal Runtime Runtime { get; set; } - /// Enable jmx core metrics for the java app. - [WirePath("runtime.java.enableMetrics")] - public bool? EnableMetrics - { - get => Runtime is null ? default : Runtime.EnableMetrics; - set - { - if (Runtime is null) - Runtime = new Runtime(); - Runtime.EnableMetrics = value; - } - } - + [WirePath("runtime")] + public Runtime Runtime { get; set; } /// Optional. Max inactive revisions a Container App can have. [WirePath("maxInactiveRevisions")] public int? MaxInactiveRevisions { get; set; } + /// 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. + [WirePath("revisionTransitionThreshold")] + public int? RevisionTransitionThreshold { get; set; } /// Container App to be a dev Container App Service. internal Service Service { get; set; } /// Dev ContainerApp service type. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.Serialization.cs index f62d3cadc10b..fb5e03998a66 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.Serialization.cs @@ -71,6 +71,7 @@ internal static ContainerAppContainer DeserializeContainerAppContainer(JsonEleme } IList probes = default; string image = default; + ImageType? imageType = default; string name = default; IList command = default; IList args = default; @@ -100,6 +101,15 @@ internal static ContainerAppContainer DeserializeContainerAppContainer(JsonEleme image = property.Value.GetString(); continue; } + if (property.NameEquals("imageType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageType = new ImageType(property.Value.GetString()); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); @@ -178,6 +188,7 @@ internal static ContainerAppContainer DeserializeContainerAppContainer(JsonEleme serializedAdditionalRawData = rawDataDictionary; return new ContainerAppContainer( image, + imageType, name, command ?? new ChangeTrackingList(), args ?? new ChangeTrackingList(), @@ -245,6 +256,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ImageType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" imageType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ImageType)) + { + builder.Append(" imageType: "); + builder.AppendLine($"'{ImageType.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.cs index ab389a1583d2..dcf3c819d6e9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppContainer.cs @@ -21,6 +21,7 @@ public ContainerAppContainer() /// Initializes a new instance of . /// Container image tag. + /// The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update image through image field. Set to ContainerImage for user provided image. /// Custom container name. /// Container start command. /// Container start command arguments. @@ -29,7 +30,7 @@ public ContainerAppContainer() /// Container volume mounts. /// Keeps track of any properties unknown to the library. /// List of probes for the container. - internal ContainerAppContainer(string image, string name, IList command, IList args, IList env, AppContainerResources resources, IList volumeMounts, IDictionary serializedAdditionalRawData, IList probes) : base(image, name, command, args, env, resources, volumeMounts, serializedAdditionalRawData) + internal ContainerAppContainer(string image, ImageType? imageType, string name, IList command, IList args, IList env, AppContainerResources resources, IList volumeMounts, IDictionary serializedAdditionalRawData, IList probes) : base(image, imageType, name, command, args, env, resources, volumeMounts, serializedAdditionalRawData) { Probes = probes; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs index c2b9a19e117e..fcbc88b987e6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -50,6 +51,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("contextPath"u8); writer.WriteStringValue(ContextPath); } + if (Optional.IsDefined(DockerfilePath)) + { + writer.WritePropertyName("dockerfilePath"u8); + writer.WriteStringValue(DockerfilePath); + } if (Optional.IsDefined(GitHubPersonalAccessToken)) { writer.WritePropertyName("githubPersonalAccessToken"u8); @@ -80,6 +86,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("runtimeVersion"u8); writer.WriteStringValue(RuntimeVersion); } + if (Optional.IsCollectionDefined(BuildEnvironmentVariables)) + { + writer.WritePropertyName("buildEnvironmentVariables"u8); + writer.WriteStartArray(); + foreach (var item in BuildEnvironmentVariables) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -120,12 +136,14 @@ internal static ContainerAppGitHubActionConfiguration DeserializeContainerAppGit ContainerAppRegistryInfo registryInfo = default; ContainerAppCredentials azureCredentials = default; string contextPath = default; + string dockerfilePath = default; string gitHubPersonalAccessToken = default; string image = default; string publishType = default; string os = default; string runtimeStack = default; string runtimeVersion = default; + IList buildEnvironmentVariables = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -153,6 +171,11 @@ internal static ContainerAppGitHubActionConfiguration DeserializeContainerAppGit contextPath = property.Value.GetString(); continue; } + if (property.NameEquals("dockerfilePath"u8)) + { + dockerfilePath = property.Value.GetString(); + continue; + } if (property.NameEquals("githubPersonalAccessToken"u8)) { gitHubPersonalAccessToken = property.Value.GetString(); @@ -183,6 +206,20 @@ internal static ContainerAppGitHubActionConfiguration DeserializeContainerAppGit runtimeVersion = property.Value.GetString(); continue; } + if (property.NameEquals("buildEnvironmentVariables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentVariable.DeserializeEnvironmentVariable(item, options)); + } + buildEnvironmentVariables = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -193,12 +230,14 @@ internal static ContainerAppGitHubActionConfiguration DeserializeContainerAppGit registryInfo, azureCredentials, contextPath, + dockerfilePath, gitHubPersonalAccessToken, image, publishType, os, runtimeStack, runtimeVersion, + buildEnvironmentVariables ?? new ChangeTrackingList(), serializedAdditionalRawData); } @@ -266,6 +305,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DockerfilePath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dockerfilePath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DockerfilePath)) + { + builder.Append(" dockerfilePath: "); + if (DockerfilePath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DockerfilePath}'''"); + } + else + { + builder.AppendLine($"'{DockerfilePath}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GitHubPersonalAccessToken), out propertyOverride); if (hasPropertyOverride) { @@ -404,6 +466,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BuildEnvironmentVariables), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" buildEnvironmentVariables: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(BuildEnvironmentVariables)) + { + if (BuildEnvironmentVariables.Any()) + { + builder.Append(" buildEnvironmentVariables: "); + builder.AppendLine("["); + foreach (var item in BuildEnvironmentVariables) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " buildEnvironmentVariables: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs index d1221df73902..42081f05f933 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppGitHubActionConfiguration.cs @@ -48,30 +48,35 @@ public partial class ContainerAppGitHubActionConfiguration /// Initializes a new instance of . public ContainerAppGitHubActionConfiguration() { + BuildEnvironmentVariables = new ChangeTrackingList(); } /// Initializes a new instance of . /// Registry configurations. /// AzureCredentials configurations. /// Context path. + /// Dockerfile path. /// One time Github PAT to configure github environment. /// Image name. /// Code or Image. /// Operation system. /// Runtime stack. /// Runtime version. + /// List of environment variables to be passed to the build. /// Keeps track of any properties unknown to the library. - internal ContainerAppGitHubActionConfiguration(ContainerAppRegistryInfo registryInfo, ContainerAppCredentials azureCredentials, string contextPath, string gitHubPersonalAccessToken, string image, string publishType, string os, string runtimeStack, string runtimeVersion, IDictionary serializedAdditionalRawData) + internal ContainerAppGitHubActionConfiguration(ContainerAppRegistryInfo registryInfo, ContainerAppCredentials azureCredentials, string contextPath, string dockerfilePath, string gitHubPersonalAccessToken, string image, string publishType, string os, string runtimeStack, string runtimeVersion, IList buildEnvironmentVariables, IDictionary serializedAdditionalRawData) { RegistryInfo = registryInfo; AzureCredentials = azureCredentials; ContextPath = contextPath; + DockerfilePath = dockerfilePath; GitHubPersonalAccessToken = gitHubPersonalAccessToken; Image = image; PublishType = publishType; OS = os; RuntimeStack = runtimeStack; RuntimeVersion = runtimeVersion; + BuildEnvironmentVariables = buildEnvironmentVariables; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -84,6 +89,9 @@ internal ContainerAppGitHubActionConfiguration(ContainerAppRegistryInfo registry /// Context path. [WirePath("contextPath")] public string ContextPath { get; set; } + /// Dockerfile path. + [WirePath("dockerfilePath")] + public string DockerfilePath { get; set; } /// One time Github PAT to configure github environment. [WirePath("githubPersonalAccessToken")] public string GitHubPersonalAccessToken { get; set; } @@ -102,5 +110,8 @@ internal ContainerAppGitHubActionConfiguration(ContainerAppRegistryInfo registry /// Runtime version. [WirePath("runtimeVersion")] public string RuntimeVersion { get; set; } + /// List of environment variables to be passed to the build. + [WirePath("buildEnvironmentVariables")] + public IList BuildEnvironmentVariables { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRoute.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRoute.cs index b74b201f2333..0f96b3b69590 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRoute.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRoute.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// Http Routes, including paths to match on and whether or not rewrites are to be done. + /// Http Routes configuration, including paths to match on and whether or not rewrites are to be done. public partial class ContainerAppHttpRoute { /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteConfigProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteConfigProperties.cs index cf84d158ac18..85a14c7ac50b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteConfigProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteConfigProperties.cs @@ -54,11 +54,11 @@ public ContainerAppHttpRouteConfigProperties() } /// Initializes a new instance of . - /// The provisioning state of the Http Route Config. + /// The provisioning state of the Http Route Config in cluster. /// List of errors when trying to reconcile http routes. /// FQDN of the route resource. - /// Custom domain bindings for Http Routes' hostnames. - /// Routing Rules for the Http Route resource. + /// Custom domain bindings for http Routes' hostnames. + /// Routing Rules for http route resource. /// Keeps track of any properties unknown to the library. internal ContainerAppHttpRouteConfigProperties(ContainerAppHttpRouteProvisioningState? provisioningState, IReadOnlyList provisioningErrors, string fqdn, IList customDomains, IList rules, IDictionary serializedAdditionalRawData) { @@ -70,7 +70,7 @@ internal ContainerAppHttpRouteConfigProperties(ContainerAppHttpRouteProvisioning _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The provisioning state of the Http Route Config. + /// The provisioning state of the Http Route Config in cluster. [WirePath("provisioningState")] public ContainerAppHttpRouteProvisioningState? ProvisioningState { get; } /// List of errors when trying to reconcile http routes. @@ -79,10 +79,10 @@ internal ContainerAppHttpRouteConfigProperties(ContainerAppHttpRouteProvisioning /// FQDN of the route resource. [WirePath("fqdn")] public string Fqdn { get; } - /// Custom domain bindings for Http Routes' hostnames. + /// Custom domain bindings for http Routes' hostnames. [WirePath("customDomains")] public IList CustomDomains { get; } - /// Routing Rules for the Http Route resource. + /// Routing Rules for http route resource. [WirePath("rules")] public IList Rules { get; } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteProvisioningErrors.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteProvisioningErrors.cs index d3d794869a53..089675ef30be 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteProvisioningErrors.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteProvisioningErrors.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// List of provisioning errors for a Http Route Config object. + /// List of provisioning errors for a http route config object. public partial class ContainerAppHttpRouteProvisioningErrors { /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteRule.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteRule.cs index e0d8f1277e58..95a9228dea46 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteRule.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteRule.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// A set of routing conditions and targets. + /// Http Route rule. public partial class ContainerAppHttpRouteRule { /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.Serialization.cs index 4d2262273843..70cd213f9f5e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.Serialization.cs @@ -47,6 +47,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("label"u8); writer.WriteStringValue(Label); } + if (Optional.IsDefined(Weight)) + { + writer.WritePropertyName("weight"u8); + writer.WriteNumberValue(Weight.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -87,6 +92,7 @@ internal static ContainerAppHttpRouteTarget DeserializeContainerAppHttpRouteTarg string containerApp = default; string revision = default; string label = default; + int? weight = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -106,13 +112,22 @@ internal static ContainerAppHttpRouteTarget DeserializeContainerAppHttpRouteTarg label = property.Value.GetString(); continue; } + if (property.NameEquals("weight"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + weight = property.Value.GetInt32(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerAppHttpRouteTarget(containerApp, revision, label, serializedAdditionalRawData); + return new ContainerAppHttpRouteTarget(containerApp, revision, label, weight, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -195,6 +210,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Weight), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" weight: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Weight)) + { + builder.Append(" weight: "); + builder.AppendLine($"{Weight.Value}"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.cs index 411084919a08..d114dc6de033 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppHttpRouteTarget.cs @@ -58,13 +58,15 @@ public ContainerAppHttpRouteTarget(string containerApp) /// Initializes a new instance of . /// Container App Name to route requests to. /// Revision to route requests to. - /// Label to route requests to. + /// Label/Revision to route requests to. + /// Weighted routing. /// Keeps track of any properties unknown to the library. - internal ContainerAppHttpRouteTarget(string containerApp, string revision, string label, IDictionary serializedAdditionalRawData) + internal ContainerAppHttpRouteTarget(string containerApp, string revision, string label, int? weight, IDictionary serializedAdditionalRawData) { ContainerApp = containerApp; Revision = revision; Label = label; + Weight = weight; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -79,8 +81,11 @@ internal ContainerAppHttpRouteTarget() /// Revision to route requests to. [WirePath("revision")] public string Revision { get; set; } - /// Label to route requests to. + /// Label/Revision to route requests to. [WirePath("label")] public string Label { get; set; } + /// Weighted routing. + [WirePath("weight")] + public int? Weight { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs index 2a75179273dd..817a0d53a308 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.Serialization.cs @@ -121,6 +121,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(TargetPortHttpScheme)) + { + writer.WritePropertyName("targetPortHttpScheme"u8); + writer.WriteStringValue(TargetPortHttpScheme.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -171,6 +176,7 @@ internal static ContainerAppIngressConfiguration DeserializeContainerAppIngressC ContainerAppIngressClientCertificateMode? clientCertificateMode = default; ContainerAppCorsPolicy corsPolicy = default; IList additionalPortMappings = default; + IngressTargetPortHttpScheme? targetPortHttpScheme = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -308,6 +314,15 @@ internal static ContainerAppIngressConfiguration DeserializeContainerAppIngressC additionalPortMappings = array; continue; } + if (property.NameEquals("targetPortHttpScheme"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetPortHttpScheme = new IngressTargetPortHttpScheme(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -328,6 +343,7 @@ internal static ContainerAppIngressConfiguration DeserializeContainerAppIngressC clientCertificateMode, corsPolicy, additionalPortMappings ?? new ChangeTrackingList(), + targetPortHttpScheme, serializedAdditionalRawData); } @@ -582,6 +598,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetPortHttpScheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetPortHttpScheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetPortHttpScheme)) + { + builder.Append(" targetPortHttpScheme: "); + builder.AppendLine($"'{TargetPortHttpScheme.Value.ToString()}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs index 6a8733180a10..ec4dd21448bf 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppIngressConfiguration.cs @@ -68,8 +68,9 @@ public ContainerAppIngressConfiguration() /// Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. /// CORS policy for container app. /// Settings to expose additional ports on container app. + /// Whether an http app listens on http or https. /// Keeps track of any properties unknown to the library. - internal ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, ContainerAppIngressTransportMethod? transport, IList traffic, IList customDomains, bool? allowInsecure, IList ipSecurityRestrictions, IngressStickySessions stickySessions, ContainerAppIngressClientCertificateMode? clientCertificateMode, ContainerAppCorsPolicy corsPolicy, IList additionalPortMappings, IDictionary serializedAdditionalRawData) + internal ContainerAppIngressConfiguration(string fqdn, bool? external, int? targetPort, int? exposedPort, ContainerAppIngressTransportMethod? transport, IList traffic, IList customDomains, bool? allowInsecure, IList ipSecurityRestrictions, IngressStickySessions stickySessions, ContainerAppIngressClientCertificateMode? clientCertificateMode, ContainerAppCorsPolicy corsPolicy, IList additionalPortMappings, IngressTargetPortHttpScheme? targetPortHttpScheme, IDictionary serializedAdditionalRawData) { Fqdn = fqdn; External = external; @@ -84,6 +85,7 @@ internal ContainerAppIngressConfiguration(string fqdn, bool? external, int? targ ClientCertificateMode = clientCertificateMode; CorsPolicy = corsPolicy; AdditionalPortMappings = additionalPortMappings; + TargetPortHttpScheme = targetPortHttpScheme; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -138,5 +140,8 @@ public Affinity? StickySessionsAffinity /// Settings to expose additional ports on container app. [WirePath("additionalPortMappings")] public IList AdditionalPortMappings { get; } + /// Whether an http app listens on http or https. + [WirePath("targetPortHttpScheme")] + public IngressTargetPortHttpScheme? TargetPortHttpScheme { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.Serialization.cs index e544324884ae..63d638c98edf 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.Serialization.cs @@ -60,6 +60,7 @@ internal static ContainerAppInitContainer DeserializeContainerAppInitContainer(J return null; } string image = default; + ImageType? imageType = default; string name = default; IList command = default; IList args = default; @@ -75,6 +76,15 @@ internal static ContainerAppInitContainer DeserializeContainerAppInitContainer(J image = property.Value.GetString(); continue; } + if (property.NameEquals("imageType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageType = new ImageType(property.Value.GetString()); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); @@ -153,6 +163,7 @@ internal static ContainerAppInitContainer DeserializeContainerAppInitContainer(J serializedAdditionalRawData = rawDataDictionary; return new ContainerAppInitContainer( image, + imageType, name, command ?? new ChangeTrackingList(), args ?? new ChangeTrackingList(), @@ -196,6 +207,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ImageType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" imageType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ImageType)) + { + builder.Append(" imageType: "); + builder.AppendLine($"'{ImageType.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs index e3f05ba422c4..a7aa04cf8492 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppInitContainer.cs @@ -20,6 +20,7 @@ public ContainerAppInitContainer() /// Initializes a new instance of . /// Container image tag. + /// The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update image through image field. Set to ContainerImage for user provided image. /// Custom container name. /// Container start command. /// Container start command arguments. @@ -27,7 +28,7 @@ public ContainerAppInitContainer() /// Container resource requirements. /// Container volume mounts. /// Keeps track of any properties unknown to the library. - internal ContainerAppInitContainer(string image, string name, IList command, IList args, IList env, AppContainerResources resources, IList volumeMounts, IDictionary serializedAdditionalRawData) : base(image, name, command, args, env, resources, volumeMounts, serializedAdditionalRawData) + internal ContainerAppInitContainer(string image, ImageType? imageType, string name, IList command, IList args, IList env, AppContainerResources resources, IList volumeMounts, IDictionary serializedAdditionalRawData) : base(image, imageType, name, command, args, env, resources, volumeMounts, serializedAdditionalRawData) { } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.Serialization.cs index 7f6cf4497b3c..a31e38f33502 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.Serialization.cs @@ -36,6 +36,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerAppJobPatch)} does not support writing '{format}' format."); } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -94,6 +99,7 @@ internal static ContainerAppJobPatch DeserializeContainerAppJobPatch(JsonElement { return null; } + ContainerAppExtendedLocation extendedLocation = default; ManagedServiceIdentity identity = default; IDictionary tags = default; ContainerAppJobPatchProperties properties = default; @@ -101,6 +107,15 @@ internal static ContainerAppJobPatch DeserializeContainerAppJobPatch(JsonElement Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = ContainerAppExtendedLocation.DeserializeContainerAppExtendedLocation(property.Value, options); + continue; + } if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -139,7 +154,7 @@ internal static ContainerAppJobPatch DeserializeContainerAppJobPatch(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerAppJobPatch(identity, tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + return new ContainerAppJobPatch(extendedLocation, identity, tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.cs index 4367700245d1..9ee618bd63f6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobPatch.cs @@ -53,18 +53,23 @@ public ContainerAppJobPatch() } /// Initializes a new instance of . + /// The complex type of the extended location. /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. /// Resource tags. /// /// Keeps track of any properties unknown to the library. - internal ContainerAppJobPatch(ManagedServiceIdentity identity, IDictionary tags, ContainerAppJobPatchProperties properties, IDictionary serializedAdditionalRawData) + internal ContainerAppJobPatch(ContainerAppExtendedLocation extendedLocation, ManagedServiceIdentity identity, IDictionary tags, ContainerAppJobPatchProperties properties, IDictionary serializedAdditionalRawData) { + ExtendedLocation = extendedLocation; Identity = identity; Tags = tags; Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The complex type of the extended location. + [WirePath("extendedLocation")] + public ContainerAppExtendedLocation ExtendedLocation { get; set; } /// Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs index c78e1b77ac65..28341bd7f8de 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobScaleRule.cs @@ -59,7 +59,7 @@ public ContainerAppJobScaleRule() /// /// Metadata properties to describe the scale rule. /// Authentication secrets for the scale rule. - /// The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. + /// The resource ID of a user-assigned managed identity that is assigned to the job, or 'system' for system-assigned identity. /// Keeps track of any properties unknown to the library. internal ContainerAppJobScaleRule(string name, string jobScaleRuleType, BinaryData metadata, IList auth, string identity, IDictionary serializedAdditionalRawData) { @@ -115,7 +115,7 @@ internal ContainerAppJobScaleRule(string name, string jobScaleRuleType, BinaryDa /// Authentication secrets for the scale rule. [WirePath("auth")] public IList Auth { get; } - /// The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. + /// The resource ID of a user-assigned managed identity that is assigned to the job, or 'system' for system-assigned identity. [WirePath("identity")] public string Identity { get; set; } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppKind.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppKind.cs index 5863ea5cb50c..6162092a979e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppKind.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppKind.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// Metadata to represent the container app kind, representing if a container app is workflowapp or functionapp. + /// Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. public readonly partial struct ContainerAppKind : IEquatable { private readonly string _value; @@ -23,12 +23,9 @@ public ContainerAppKind(string value) } private const string WorkflowappValue = "workflowapp"; - private const string FunctionappValue = "functionapp"; /// workflowapp. public static ContainerAppKind Workflowapp { get; } = new ContainerAppKind(WorkflowappValue); - /// functionapp. - public static ContainerAppKind Functionapp { get; } = new ContainerAppKind(FunctionappValue); /// Determines if two values are the same. public static bool operator ==(ContainerAppKind left, ContainerAppKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.Serialization.cs index ec79aff61803..4ee8bfe2fe32 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.Serialization.cs @@ -45,6 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sharedKey"u8); writer.WriteStringValue(SharedKey); } + if (Optional.IsDefined(DynamicJsonColumns)) + { + writer.WritePropertyName("dynamicJsonColumns"u8); + writer.WriteBooleanValue(DynamicJsonColumns.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,6 +89,7 @@ internal static ContainerAppLogAnalyticsConfiguration DeserializeContainerAppLog } string customerId = default; string sharedKey = default; + bool? dynamicJsonColumns = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -98,13 +104,22 @@ internal static ContainerAppLogAnalyticsConfiguration DeserializeContainerAppLog sharedKey = property.Value.GetString(); continue; } + if (property.NameEquals("dynamicJsonColumns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicJsonColumns = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerAppLogAnalyticsConfiguration(customerId, sharedKey, serializedAdditionalRawData); + return new ContainerAppLogAnalyticsConfiguration(customerId, sharedKey, dynamicJsonColumns, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -164,6 +179,22 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DynamicJsonColumns), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dynamicJsonColumns: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DynamicJsonColumns)) + { + builder.Append(" dynamicJsonColumns: "); + var boolValue = DynamicJsonColumns.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs index bf87fce14176..ff34a3477b75 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppLogAnalyticsConfiguration.cs @@ -53,11 +53,13 @@ public ContainerAppLogAnalyticsConfiguration() /// Initializes a new instance of . /// Log analytics customer id. /// Log analytics customer key. + /// Boolean indicating whether to parse json string log into dynamic json columns. /// Keeps track of any properties unknown to the library. - internal ContainerAppLogAnalyticsConfiguration(string customerId, string sharedKey, IDictionary serializedAdditionalRawData) + internal ContainerAppLogAnalyticsConfiguration(string customerId, string sharedKey, bool? dynamicJsonColumns, IDictionary serializedAdditionalRawData) { CustomerId = customerId; SharedKey = sharedKey; + DynamicJsonColumns = dynamicJsonColumns; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -67,5 +69,8 @@ internal ContainerAppLogAnalyticsConfiguration(string customerId, string sharedK /// Log analytics customer key. [WirePath("sharedKey")] public string SharedKey { get; set; } + /// Boolean indicating whether to parse json string log into dynamic json columns. + [WirePath("dynamicJsonColumns")] + public bool? DynamicJsonColumns { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppNfsAzureFileProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppNfsAzureFileProperties.cs index ad4f82589e88..8c3df896df9e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppNfsAzureFileProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppNfsAzureFileProperties.cs @@ -51,7 +51,7 @@ public ContainerAppNfsAzureFileProperties() } /// Initializes a new instance of . - /// Server for NFS azure file. Specify the Azure storage account server address. + /// Server for NFS azure file. /// Access mode for storage. /// NFS Azure file share name. /// Keeps track of any properties unknown to the library. @@ -63,7 +63,7 @@ internal ContainerAppNfsAzureFileProperties(string server, ContainerAppAccessMod _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Server for NFS azure file. Specify the Azure storage account server address. + /// Server for NFS azure file. [WirePath("server")] public string Server { get; set; } /// Access mode for storage. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppPropertiesPatchingConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppPropertiesPatchingConfiguration.Serialization.cs new file mode 100644 index 000000000000..540977729278 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppPropertiesPatchingConfiguration.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class ContainerAppPropertiesPatchingConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppPropertiesPatchingConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PatchingMode)) + { + writer.WritePropertyName("patchingMode"u8); + writer.WriteStringValue(PatchingMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerAppPropertiesPatchingConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppPropertiesPatchingConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerAppPropertiesPatchingConfiguration(document.RootElement, options); + } + + internal static ContainerAppPropertiesPatchingConfiguration DeserializeContainerAppPropertiesPatchingConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PatchingMode? patchingMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("patchingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchingMode = new PatchingMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerAppPropertiesPatchingConfiguration(patchingMode, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchingMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchingMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchingMode)) + { + builder.Append(" patchingMode: "); + builder.AppendLine($"'{PatchingMode.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerAppPropertiesPatchingConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ContainerAppPropertiesPatchingConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerAppPropertiesPatchingConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerAppPropertiesPatchingConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppPropertiesPatchingConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppPropertiesPatchingConfiguration.cs new file mode 100644 index 000000000000..64d23e810f0d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppPropertiesPatchingConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App auto patch configuration. + internal partial class ContainerAppPropertiesPatchingConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerAppPropertiesPatchingConfiguration() + { + } + + /// Initializes a new instance of . + /// Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + /// Keeps track of any properties unknown to the library. + internal ContainerAppPropertiesPatchingConfiguration(PatchingMode? patchingMode, IDictionary serializedAdditionalRawData) + { + PatchingMode = patchingMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + [WirePath("patchingMode")] + public PatchingMode? PatchingMode { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs index c3b2adade690..f1518563549a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.Serialization.cs @@ -80,6 +80,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("execEndpoint"u8); writer.WriteStringValue(ExecEndpoint); } + if (options.Format != "W" && Optional.IsDefined(DebugEndpoint)) + { + writer.WritePropertyName("debugEndpoint"u8); + writer.WriteStringValue(DebugEndpoint); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -126,6 +131,7 @@ internal static ContainerAppReplicaContainer DeserializeContainerAppReplicaConta string runningStateDetails = default; string logStreamEndpoint = default; string execEndpoint = default; + string debugEndpoint = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -191,6 +197,11 @@ internal static ContainerAppReplicaContainer DeserializeContainerAppReplicaConta execEndpoint = property.Value.GetString(); continue; } + if (property.NameEquals("debugEndpoint"u8)) + { + debugEndpoint = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -207,6 +218,7 @@ internal static ContainerAppReplicaContainer DeserializeContainerAppReplicaConta runningStateDetails, logStreamEndpoint, execEndpoint, + debugEndpoint, serializedAdditionalRawData); } @@ -398,6 +410,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DebugEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" debugEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DebugEndpoint)) + { + builder.Append(" debugEndpoint: "); + if (DebugEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DebugEndpoint}'''"); + } + else + { + builder.AppendLine($"'{DebugEndpoint}'"); + } + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs index 2aa59e0405bc..5ade3b33ebea 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppReplicaContainer.cs @@ -60,8 +60,9 @@ public ContainerAppReplicaContainer() /// The details of container current running state. /// Log Stream endpoint. /// Container exec endpoint. + /// Container debug endpoint. /// Keeps track of any properties unknown to the library. - internal ContainerAppReplicaContainer(string name, string containerId, bool? isReady, bool? isStarted, int? restartCount, ContainerAppContainerRunningState? runningState, string runningStateDetails, string logStreamEndpoint, string execEndpoint, IDictionary serializedAdditionalRawData) + internal ContainerAppReplicaContainer(string name, string containerId, bool? isReady, bool? isStarted, int? restartCount, ContainerAppContainerRunningState? runningState, string runningStateDetails, string logStreamEndpoint, string execEndpoint, string debugEndpoint, IDictionary serializedAdditionalRawData) { Name = name; ContainerId = containerId; @@ -72,6 +73,7 @@ internal ContainerAppReplicaContainer(string name, string containerId, bool? isR RunningStateDetails = runningStateDetails; LogStreamEndpoint = logStreamEndpoint; ExecEndpoint = execEndpoint; + DebugEndpoint = debugEndpoint; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -102,5 +104,8 @@ internal ContainerAppReplicaContainer(string name, string containerId, bool? isR /// Container exec endpoint. [WirePath("execEndpoint")] public string ExecEndpoint { get; } + /// Container debug endpoint. + [WirePath("debugEndpoint")] + public string DebugEndpoint { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScale.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScale.cs index 62619cdb672f..e5235f3a7aa2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScale.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppScale.cs @@ -54,8 +54,8 @@ public ContainerAppScale() /// Initializes a new instance of . /// Optional. Minimum number of container replicas. /// Optional. Maximum number of container replicas. Defaults to 10 if not set. - /// Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if not set. - /// Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if not set. + /// Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. + /// Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. /// Scaling rules. /// Keeps track of any properties unknown to the library. internal ContainerAppScale(int? minReplicas, int? maxReplicas, int? cooldownPeriod, int? pollingInterval, IList rules, IDictionary serializedAdditionalRawData) @@ -74,10 +74,10 @@ internal ContainerAppScale(int? minReplicas, int? maxReplicas, int? cooldownPeri /// Optional. Maximum number of container replicas. Defaults to 10 if not set. [WirePath("maxReplicas")] public int? MaxReplicas { get; set; } - /// Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if not set. + /// Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. [WirePath("cooldownPeriod")] public int? CooldownPeriod { get; set; } - /// Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if not set. + /// Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. [WirePath("pollingInterval")] public int? PollingInterval { get; set; } /// Scaling rules. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.Serialization.cs index 6226e1b123ab..fd49d0ce3b03 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -45,6 +46,22 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } + if (Optional.IsDefined(ClientType)) + { + writer.WritePropertyName("clientType"u8); + writer.WriteStringValue(ClientType); + } + if (Optional.IsCollectionDefined(CustomizedKeys)) + { + writer.WritePropertyName("customizedKeys"u8); + writer.WriteStartObject(); + foreach (var item in CustomizedKeys) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,6 +101,8 @@ internal static ContainerAppServiceBind DeserializeContainerAppServiceBind(JsonE } ResourceIdentifier serviceId = default; string name = default; + string clientType = default; + IDictionary customizedKeys = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -102,13 +121,32 @@ internal static ContainerAppServiceBind DeserializeContainerAppServiceBind(JsonE name = property.Value.GetString(); continue; } + if (property.NameEquals("clientType"u8)) + { + clientType = property.Value.GetString(); + continue; + } + if (property.NameEquals("customizedKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + customizedKeys = dictionary; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerAppServiceBind(serviceId, name, serializedAdditionalRawData); + return new ContainerAppServiceBind(serviceId, name, clientType, customizedKeys ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -160,6 +198,66 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientType)) + { + builder.Append(" clientType: "); + if (ClientType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientType}'''"); + } + else + { + builder.AppendLine($"'{ClientType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomizedKeys), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customizedKeys: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(CustomizedKeys)) + { + if (CustomizedKeys.Any()) + { + builder.Append(" customizedKeys: "); + builder.AppendLine("{"); + foreach (var item in CustomizedKeys) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs index 330156fee9ec..defd7ede70c2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppServiceBind.cs @@ -49,16 +49,21 @@ public partial class ContainerAppServiceBind /// Initializes a new instance of . public ContainerAppServiceBind() { + CustomizedKeys = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// Resource id of the target service. /// Name of the service bind. + /// Type of the client to be used to connect to the service. + /// Customized keys for customizing injected values to the app. /// Keeps track of any properties unknown to the library. - internal ContainerAppServiceBind(ResourceIdentifier serviceId, string name, IDictionary serializedAdditionalRawData) + internal ContainerAppServiceBind(ResourceIdentifier serviceId, string name, string clientType, IDictionary customizedKeys, IDictionary serializedAdditionalRawData) { ServiceId = serviceId; Name = name; + ClientType = clientType; + CustomizedKeys = customizedKeys; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -68,5 +73,11 @@ internal ContainerAppServiceBind(ResourceIdentifier serviceId, string name, IDic /// Name of the service bind. [WirePath("name")] public string Name { get; set; } + /// Type of the client to be used to connect to the service. + [WirePath("clientType")] + public string ClientType { get; set; } + /// Customized keys for customizing injected values to the app. + [WirePath("customizedKeys")] + public IDictionary CustomizedKeys { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs index 8df8d53791d0..d84c199e19e3 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppStorageType.cs @@ -26,6 +26,7 @@ public ContainerAppStorageType(string value) private const string EmptyDirValue = "EmptyDir"; private const string SecretValue = "Secret"; private const string NfsAzureFileValue = "NfsAzureFile"; + private const string SmbValue = "Smb"; /// AzureFile. public static ContainerAppStorageType AzureFile { get; } = new ContainerAppStorageType(AzureFileValue); @@ -35,6 +36,8 @@ public ContainerAppStorageType(string value) public static ContainerAppStorageType Secret { get; } = new ContainerAppStorageType(SecretValue); /// NfsAzureFile. public static ContainerAppStorageType NfsAzureFile { get; } = new ContainerAppStorageType(NfsAzureFileValue); + /// Smb. + public static ContainerAppStorageType Smb { get; } = new ContainerAppStorageType(SmbValue); /// Determines if two values are the same. public static bool operator ==(ContainerAppStorageType left, ContainerAppStorageType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.Serialization.cs index f9995086d790..b5b39a9f2f6c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.Serialization.cs @@ -172,14 +172,11 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("AzureBlobStorageSasUrlSettingName", out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureBlobStorage), out propertyOverride); if (hasPropertyOverride) { builder.Append(" azureBlobStorage: "); - builder.AppendLine("{"); - builder.Append(" sasUrlSettingName: "); builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); } else { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs index 4f7a25bb431e..92e159f32c5a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppTokenStore.cs @@ -82,13 +82,7 @@ internal ContainerAppTokenStore(bool? isEnabled, double? tokenRefreshExtensionHo [WirePath("tokenRefreshExtensionHours")] public double? TokenRefreshExtensionHours { get; set; } /// The configuration settings of the storage of the tokens if blob storage is used. - internal BlobStorageTokenStore AzureBlobStorage { get; set; } - /// The name of the app secrets containing the SAS URL of the blob storage containing the tokens. - [WirePath("azureBlobStorage.sasUrlSettingName")] - public string AzureBlobStorageSasUrlSettingName - { - get => AzureBlobStorage is null ? default : AzureBlobStorage.SasUrlSettingName; - set => AzureBlobStorage = new BlobStorageTokenStore(value); - } + [WirePath("azureBlobStorage")] + public BlobStorageTokenStore AzureBlobStorage { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs index 8e52414fde1b..1cf0c25bb24a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.Serialization.cs @@ -37,6 +37,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + if (Optional.IsDefined(EnableFips)) + { + writer.WritePropertyName("enableFips"u8); + writer.WriteBooleanValue(EnableFips.Value); + } writer.WritePropertyName("workloadProfileType"u8); writer.WriteStringValue(WorkloadProfileType); if (Optional.IsDefined(MinimumNodeCount)) @@ -87,6 +92,7 @@ internal static ContainerAppWorkloadProfile DeserializeContainerAppWorkloadProfi return null; } string name = default; + bool? enableFips = default; string workloadProfileType = default; int? minimumCount = default; int? maximumCount = default; @@ -99,6 +105,15 @@ internal static ContainerAppWorkloadProfile DeserializeContainerAppWorkloadProfi name = property.Value.GetString(); continue; } + if (property.NameEquals("enableFips"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableFips = property.Value.GetBoolean(); + continue; + } if (property.NameEquals("workloadProfileType"u8)) { workloadProfileType = property.Value.GetString(); @@ -128,7 +143,13 @@ internal static ContainerAppWorkloadProfile DeserializeContainerAppWorkloadProfi } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerAppWorkloadProfile(name, workloadProfileType, minimumCount, maximumCount, serializedAdditionalRawData); + return new ContainerAppWorkloadProfile( + name, + enableFips, + workloadProfileType, + minimumCount, + maximumCount, + serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -165,6 +186,22 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableFips), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableFips: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableFips)) + { + builder.Append(" enableFips: "); + var boolValue = EnableFips.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WorkloadProfileType), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs index 506df6854a80..7fbd3364120a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppWorkloadProfile.cs @@ -60,13 +60,15 @@ public ContainerAppWorkloadProfile(string name, string workloadProfileType) /// Initializes a new instance of . /// Workload profile type for the workloads to run on. + /// Whether to use a FIPS-enabled OS. Supported only for dedicated workload profiles. /// Workload profile type for the workloads to run on. /// The minimum capacity. /// The maximum capacity. /// Keeps track of any properties unknown to the library. - internal ContainerAppWorkloadProfile(string name, string workloadProfileType, int? minimumNodeCount, int? maximumNodeCount, IDictionary serializedAdditionalRawData) + internal ContainerAppWorkloadProfile(string name, bool? enableFips, string workloadProfileType, int? minimumNodeCount, int? maximumNodeCount, IDictionary serializedAdditionalRawData) { Name = name; + EnableFips = enableFips; WorkloadProfileType = workloadProfileType; MinimumNodeCount = minimumNodeCount; MaximumNodeCount = maximumNodeCount; @@ -81,6 +83,9 @@ internal ContainerAppWorkloadProfile() /// Workload profile type for the workloads to run on. [WirePath("name")] public string Name { get; set; } + /// Whether to use a FIPS-enabled OS. Supported only for dedicated workload profiles. + [WirePath("enableFips")] + public bool? EnableFips { get; set; } /// Workload profile type for the workloads to run on. [WirePath("workloadProfileType")] public string WorkloadProfileType { get; set; } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildCollection.Serialization.cs new file mode 100644 index 000000000000..6d5e682e667a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildCollection.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class ContainerAppsBuildCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsBuildCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerAppsBuildCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsBuildCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerAppsBuildCollection(document.RootElement, options); + } + + internal static ContainerAppsBuildCollection DeserializeContainerAppsBuildCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppsBuildResourceData.DeserializeContainerAppsBuildResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerAppsBuildCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerAppsBuildCollection)} does not support writing '{options.Format}' format."); + } + } + + ContainerAppsBuildCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerAppsBuildCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerAppsBuildCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildCollection.cs new file mode 100644 index 000000000000..214acd39cd3f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The response of a Container Apps Build Resource list operation. + internal partial class ContainerAppsBuildCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Container Apps Build Resource items on this page. + /// is null. + internal ContainerAppsBuildCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Container Apps Build Resource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ContainerAppsBuildCollection(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContainerAppsBuildCollection() + { + } + + /// The Container Apps Build Resource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildConfiguration.Serialization.cs new file mode 100644 index 000000000000..c156dde20f0f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildConfiguration.Serialization.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerAppsBuildConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsBuildConfiguration)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(BaseOS)) + { + writer.WritePropertyName("baseOs"u8); + writer.WriteStringValue(BaseOS); + } + if (options.Format != "W" && Optional.IsDefined(Platform)) + { + writer.WritePropertyName("platform"u8); + writer.WriteStringValue(Platform); + } + if (options.Format != "W" && Optional.IsDefined(PlatformVersion)) + { + writer.WritePropertyName("platformVersion"u8); + writer.WriteStringValue(PlatformVersion); + } + if (options.Format != "W" && Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentVariables) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(PreBuildSteps)) + { + writer.WritePropertyName("preBuildSteps"u8); + writer.WriteStartArray(); + foreach (var item in PreBuildSteps) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerAppsBuildConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsBuildConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerAppsBuildConfiguration(document.RootElement, options); + } + + internal static ContainerAppsBuildConfiguration DeserializeContainerAppsBuildConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string baseOS = default; + string platform = default; + string platformVersion = default; + IReadOnlyList environmentVariables = default; + IReadOnlyList preBuildSteps = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseOs"u8)) + { + baseOS = property.Value.GetString(); + continue; + } + if (property.NameEquals("platform"u8)) + { + platform = property.Value.GetString(); + continue; + } + if (property.NameEquals("platformVersion"u8)) + { + platformVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentVariable.DeserializeEnvironmentVariable(item, options)); + } + environmentVariables = array; + continue; + } + if (property.NameEquals("preBuildSteps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PreBuildStep.DeserializePreBuildStep(item, options)); + } + preBuildSteps = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerAppsBuildConfiguration( + baseOS, + platform, + platformVersion, + environmentVariables ?? new ChangeTrackingList(), + preBuildSteps ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BaseOS), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" baseOs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BaseOS)) + { + builder.Append(" baseOs: "); + if (BaseOS.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BaseOS}'''"); + } + else + { + builder.AppendLine($"'{BaseOS}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Platform), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platform: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Platform)) + { + builder.Append(" platform: "); + if (Platform.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Platform}'''"); + } + else + { + builder.AppendLine($"'{Platform}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + if (PlatformVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PlatformVersion}'''"); + } + else + { + builder.AppendLine($"'{PlatformVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentVariables), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environmentVariables: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables.Any()) + { + builder.Append(" environmentVariables: "); + builder.AppendLine("["); + foreach (var item in EnvironmentVariables) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " environmentVariables: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PreBuildSteps), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" preBuildSteps: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PreBuildSteps)) + { + if (PreBuildSteps.Any()) + { + builder.Append(" preBuildSteps: "); + builder.AppendLine("["); + foreach (var item in PreBuildSteps) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " preBuildSteps: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerAppsBuildConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ContainerAppsBuildConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerAppsBuildConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerAppsBuildConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildConfiguration.cs new file mode 100644 index 000000000000..55dc9513391f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppsBuildConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of the build. + public partial class ContainerAppsBuildConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ContainerAppsBuildConfiguration() + { + EnvironmentVariables = new ChangeTrackingList(); + PreBuildSteps = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Base OS used to build and run the app. + /// Platform to be used to build and run the app. + /// Platform version to be used to build and run the app. + /// List of environment variables to be passed to the build, secrets should not be used in environment variable. + /// List of steps to perform before the build. + /// Keeps track of any properties unknown to the library. + internal ContainerAppsBuildConfiguration(string baseOS, string platform, string platformVersion, IReadOnlyList environmentVariables, IReadOnlyList preBuildSteps, IDictionary serializedAdditionalRawData) + { + BaseOS = baseOS; + Platform = platform; + PlatformVersion = platformVersion; + EnvironmentVariables = environmentVariables; + PreBuildSteps = preBuildSteps; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Base OS used to build and run the app. + [WirePath("baseOs")] + public string BaseOS { get; } + /// Platform to be used to build and run the app. + [WirePath("platform")] + public string Platform { get; } + /// Platform version to be used to build and run the app. + [WirePath("platformVersion")] + public string PlatformVersion { get; } + /// List of environment variables to be passed to the build, secrets should not be used in environment variable. + [WirePath("environmentVariables")] + public IReadOnlyList EnvironmentVariables { get; } + /// List of steps to perform before the build. + [WirePath("preBuildSteps")] + public IReadOnlyList PreBuildSteps { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerExecutionStatus.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerExecutionStatus.Serialization.cs new file mode 100644 index 000000000000..c9e00cb730d9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerExecutionStatus.Serialization.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerExecutionStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerExecutionStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteNumberValue(Code.Value); + } + if (Optional.IsDefined(AdditionalInformation)) + { + writer.WritePropertyName("additionalInformation"u8); + writer.WriteStringValue(AdditionalInformation); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerExecutionStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerExecutionStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerExecutionStatus(document.RootElement, options); + } + + internal static ContainerExecutionStatus DeserializeContainerExecutionStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int? code = default; + string additionalInformation = default; + string status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("code"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + code = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("additionalInformation"u8)) + { + additionalInformation = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerExecutionStatus(name, code, additionalInformation, status, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + builder.AppendLine($"{Code.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AdditionalInformation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" additionalInformation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AdditionalInformation)) + { + builder.Append(" additionalInformation: "); + if (AdditionalInformation.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AdditionalInformation}'''"); + } + else + { + builder.AppendLine($"'{AdditionalInformation}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + if (Status.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Status}'''"); + } + else + { + builder.AppendLine($"'{Status}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerExecutionStatus)} does not support writing '{options.Format}' format."); + } + } + + ContainerExecutionStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerExecutionStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerExecutionStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerExecutionStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerExecutionStatus.cs new file mode 100644 index 000000000000..ca9ce74275a1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerExecutionStatus.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Job execution container status. Contains status code and reason. + public partial class ContainerExecutionStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ContainerExecutionStatus() + { + } + + /// Initializes a new instance of . + /// Container Name. + /// Exit code. + /// Additional information for the container status. + /// Status of the container. + /// Keeps track of any properties unknown to the library. + internal ContainerExecutionStatus(string name, int? code, string additionalInformation, string status, IDictionary serializedAdditionalRawData) + { + Name = name; + Code = code; + AdditionalInformation = additionalInformation; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Container Name. + [WirePath("name")] + public string Name { get; } + /// Exit code. + [WirePath("code")] + public int? Code { get; } + /// Additional information for the container status. + [WirePath("additionalInformation")] + public string AdditionalInformation { get; } + /// Status of the container. + [WirePath("status")] + public string Status { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistry.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistry.Serialization.cs new file mode 100644 index 000000000000..b83d19898054 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistry.Serialization.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerRegistry : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerRegistry)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("containerRegistryServer"u8); + writer.WriteStringValue(ContainerRegistryServer); + writer.WritePropertyName("identityResourceId"u8); + writer.WriteStringValue(IdentityResourceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerRegistry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerRegistry)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerRegistry(document.RootElement, options); + } + + internal static ContainerRegistry DeserializeContainerRegistry(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string containerRegistryServer = default; + ResourceIdentifier identityResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerRegistryServer"u8)) + { + containerRegistryServer = property.Value.GetString(); + continue; + } + if (property.NameEquals("identityResourceId"u8)) + { + identityResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerRegistry(containerRegistryServer, identityResourceId, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerRegistryServer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerRegistryServer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerRegistryServer)) + { + builder.Append(" containerRegistryServer: "); + if (ContainerRegistryServer.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContainerRegistryServer}'''"); + } + else + { + builder.AppendLine($"'{ContainerRegistryServer}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityResourceId)) + { + builder.Append(" identityResourceId: "); + builder.AppendLine($"'{IdentityResourceId.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerRegistry)} does not support writing '{options.Format}' format."); + } + } + + ContainerRegistry IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerRegistry(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerRegistry)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistry.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistry.cs new file mode 100644 index 000000000000..e7f3e59fd4ca --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistry.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Model representing a mapping from a container registry to the identity used to connect to it. + public partial class ContainerRegistry + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Login server of the container registry. + /// Resource ID of the managed identity. + /// or is null. + public ContainerRegistry(string containerRegistryServer, ResourceIdentifier identityResourceId) + { + Argument.AssertNotNull(containerRegistryServer, nameof(containerRegistryServer)); + Argument.AssertNotNull(identityResourceId, nameof(identityResourceId)); + + ContainerRegistryServer = containerRegistryServer; + IdentityResourceId = identityResourceId; + } + + /// Initializes a new instance of . + /// Login server of the container registry. + /// Resource ID of the managed identity. + /// Keeps track of any properties unknown to the library. + internal ContainerRegistry(string containerRegistryServer, ResourceIdentifier identityResourceId, IDictionary serializedAdditionalRawData) + { + ContainerRegistryServer = containerRegistryServer; + IdentityResourceId = identityResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContainerRegistry() + { + } + + /// Login server of the container registry. + [WirePath("containerRegistryServer")] + public string ContainerRegistryServer { get; set; } + /// Resource ID of the managed identity. + [WirePath("identityResourceId")] + public ResourceIdentifier IdentityResourceId { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistryWithCustomImage.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistryWithCustomImage.Serialization.cs new file mode 100644 index 000000000000..234b89985c9b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistryWithCustomImage.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ContainerRegistryWithCustomImage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerRegistryWithCustomImage)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("server"u8); + writer.WriteStringValue(Server); + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteStringValue(Image); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ContainerRegistryWithCustomImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerRegistryWithCustomImage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerRegistryWithCustomImage(document.RootElement, options); + } + + internal static ContainerRegistryWithCustomImage DeserializeContainerRegistryWithCustomImage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string server = default; + string image = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("server"u8)) + { + server = property.Value.GetString(); + continue; + } + if (property.NameEquals("image"u8)) + { + image = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerRegistryWithCustomImage(server, image, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Server), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" server: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Server)) + { + builder.Append(" server: "); + if (Server.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Server}'''"); + } + else + { + builder.AppendLine($"'{Server}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Image), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" image: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Image)) + { + builder.Append(" image: "); + if (Image.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Image}'''"); + } + else + { + builder.AppendLine($"'{Image}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerRegistryWithCustomImage)} does not support writing '{options.Format}' format."); + } + } + + ContainerRegistryWithCustomImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeContainerRegistryWithCustomImage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerRegistryWithCustomImage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistryWithCustomImage.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistryWithCustomImage.cs new file mode 100644 index 000000000000..768af58ce7b4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerRegistryWithCustomImage.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container registry that the final image will be uploaded to. + public partial class ContainerRegistryWithCustomImage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Login server of the container registry that the final image should be uploaded to. Builder resource needs to have this container registry defined along with an identity to use to access it. + /// is null. + public ContainerRegistryWithCustomImage(string server) + { + Argument.AssertNotNull(server, nameof(server)); + + Server = server; + } + + /// Initializes a new instance of . + /// Login server of the container registry that the final image should be uploaded to. Builder resource needs to have this container registry defined along with an identity to use to access it. + /// Full name that the final image should be uploaded as, including both image name and tag. + /// Keeps track of any properties unknown to the library. + internal ContainerRegistryWithCustomImage(string server, string image, IDictionary serializedAdditionalRawData) + { + Server = server; + Image = image; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContainerRegistryWithCustomImage() + { + } + + /// Login server of the container registry that the final image should be uploaded to. Builder resource needs to have this container registry defined along with an identity to use to access it. + [WirePath("server")] + public string Server { get; set; } + /// Full name that the final image should be uploaded as, including both image name and tag. + [WirePath("image")] + public string Image { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentProvisioningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentProvisioningState.cs deleted file mode 100644 index e2369178994a..000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentProvisioningState.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.AppContainers.Models -{ - /// Provisioning state of the Dapr Component. - public readonly partial struct DaprComponentProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DaprComponentProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string InProgressValue = "InProgress"; - private const string DeletingValue = "Deleting"; - - /// Succeeded. - public static DaprComponentProvisioningState Succeeded { get; } = new DaprComponentProvisioningState(SucceededValue); - /// Failed. - public static DaprComponentProvisioningState Failed { get; } = new DaprComponentProvisioningState(FailedValue); - /// Canceled. - public static DaprComponentProvisioningState Canceled { get; } = new DaprComponentProvisioningState(CanceledValue); - /// InProgress. - public static DaprComponentProvisioningState InProgress { get; } = new DaprComponentProvisioningState(InProgressValue); - /// Deleting. - public static DaprComponentProvisioningState Deleting { get; } = new DaprComponentProvisioningState(DeletingValue); - /// Determines if two values are the same. - public static bool operator ==(DaprComponentProvisioningState left, DaprComponentProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DaprComponentProvisioningState left, DaprComponentProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator DaprComponentProvisioningState(string value) => new DaprComponentProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DaprComponentProvisioningState other && Equals(other); - /// - public bool Equals(DaprComponentProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPoliciesCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPoliciesCollection.Serialization.cs new file mode 100644 index 000000000000..8b4c9dcf9517 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPoliciesCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class DaprComponentResiliencyPoliciesCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPoliciesCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprComponentResiliencyPoliciesCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPoliciesCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentResiliencyPoliciesCollection(document.RootElement, options); + } + + internal static DaprComponentResiliencyPoliciesCollection DeserializeDaprComponentResiliencyPoliciesCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DaprComponentResiliencyPolicyData.DeserializeDaprComponentResiliencyPolicyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentResiliencyPoliciesCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPoliciesCollection)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentResiliencyPoliciesCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentResiliencyPoliciesCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPoliciesCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPoliciesCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPoliciesCollection.cs new file mode 100644 index 000000000000..eded90a764b0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPoliciesCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Component Resiliency Policies ARM resource. + internal partial class DaprComponentResiliencyPoliciesCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal DaprComponentResiliencyPoliciesCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal DaprComponentResiliencyPoliciesCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DaprComponentResiliencyPoliciesCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.Serialization.cs new file mode 100644 index 000000000000..3ff5f4f17a10 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConsecutiveErrors)) + { + writer.WritePropertyName("consecutiveErrors"u8); + writer.WriteNumberValue(ConsecutiveErrors.Value); + } + if (Optional.IsDefined(TimeoutInSeconds)) + { + writer.WritePropertyName("timeoutInSeconds"u8); + writer.WriteNumberValue(TimeoutInSeconds.Value); + } + if (Optional.IsDefined(IntervalInSeconds)) + { + writer.WritePropertyName("intervalInSeconds"u8); + writer.WriteNumberValue(IntervalInSeconds.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(document.RootElement, options); + } + + internal static DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration DeserializeDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? consecutiveErrors = default; + int? timeoutInSeconds = default; + int? intervalInSeconds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("consecutiveErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + consecutiveErrors = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeoutInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeoutInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("intervalInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + intervalInSeconds = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(consecutiveErrors, timeoutInSeconds, intervalInSeconds, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConsecutiveErrors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" consecutiveErrors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConsecutiveErrors)) + { + builder.Append(" consecutiveErrors: "); + builder.AppendLine($"{ConsecutiveErrors.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeoutInSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeoutInSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeoutInSeconds)) + { + builder.Append(" timeoutInSeconds: "); + builder.AppendLine($"{TimeoutInSeconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntervalInSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" intervalInSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntervalInSeconds)) + { + builder.Append(" intervalInSeconds: "); + builder.AppendLine($"{IntervalInSeconds.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.cs new file mode 100644 index 000000000000..847b23702651 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Component Resiliency Policy Circuit Breaker Policy Configuration. + public partial class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + { + } + + /// Initializes a new instance of . + /// The number of consecutive errors before the circuit is opened. + /// The interval in seconds until a retry attempt is made after the circuit is opened. + /// The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. + /// Keeps track of any properties unknown to the library. + internal DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(int? consecutiveErrors, int? timeoutInSeconds, int? intervalInSeconds, IDictionary serializedAdditionalRawData) + { + ConsecutiveErrors = consecutiveErrors; + TimeoutInSeconds = timeoutInSeconds; + IntervalInSeconds = intervalInSeconds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The number of consecutive errors before the circuit is opened. + [WirePath("consecutiveErrors")] + public int? ConsecutiveErrors { get; set; } + /// The interval in seconds until a retry attempt is made after the circuit is opened. + [WirePath("timeoutInSeconds")] + public int? TimeoutInSeconds { get; set; } + /// The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. + [WirePath("intervalInSeconds")] + public int? IntervalInSeconds { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyConfiguration.Serialization.cs new file mode 100644 index 000000000000..d00e3020aff1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyConfiguration.Serialization.cs @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprComponentResiliencyPolicyConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(HttpRetryPolicy)) + { + writer.WritePropertyName("httpRetryPolicy"u8); + writer.WriteObjectValue(HttpRetryPolicy, options); + } + if (Optional.IsDefined(TimeoutPolicy)) + { + writer.WritePropertyName("timeoutPolicy"u8); + writer.WriteObjectValue(TimeoutPolicy, options); + } + if (Optional.IsDefined(CircuitBreakerPolicy)) + { + writer.WritePropertyName("circuitBreakerPolicy"u8); + writer.WriteObjectValue(CircuitBreakerPolicy, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprComponentResiliencyPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentResiliencyPolicyConfiguration(document.RootElement, options); + } + + internal static DaprComponentResiliencyPolicyConfiguration DeserializeDaprComponentResiliencyPolicyConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy = default; + DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy = default; + DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("httpRetryPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpRetryPolicy = DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.DeserializeDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("timeoutPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeoutPolicy = DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.DeserializeDaprComponentResiliencyPolicyTimeoutPolicyConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("circuitBreakerPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreakerPolicy = DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.DeserializeDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentResiliencyPolicyConfiguration(httpRetryPolicy, timeoutPolicy, circuitBreakerPolicy, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpRetryPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpRetryPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpRetryPolicy)) + { + builder.Append(" httpRetryPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, HttpRetryPolicy, options, 2, false, " httpRetryPolicy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("ResponseTimeoutInSeconds", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeoutPolicy: "); + builder.AppendLine("{"); + builder.Append(" responseTimeoutInSeconds: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(TimeoutPolicy)) + { + builder.Append(" timeoutPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, TimeoutPolicy, options, 2, false, " timeoutPolicy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CircuitBreakerPolicy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" circuitBreakerPolicy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CircuitBreakerPolicy)) + { + builder.Append(" circuitBreakerPolicy: "); + BicepSerializationHelpers.AppendChildObject(builder, CircuitBreakerPolicy, options, 2, false, " circuitBreakerPolicy: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentResiliencyPolicyConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentResiliencyPolicyConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyConfiguration.cs new file mode 100644 index 000000000000..831ec9c71696 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Component Resiliency Policy Configuration. + public partial class DaprComponentResiliencyPolicyConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprComponentResiliencyPolicyConfiguration() + { + } + + /// Initializes a new instance of . + /// The optional HTTP retry policy configuration. + /// The optional timeout policy configuration. + /// The optional circuit breaker policy configuration. + /// Keeps track of any properties unknown to the library. + internal DaprComponentResiliencyPolicyConfiguration(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy, DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy, DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy, IDictionary serializedAdditionalRawData) + { + HttpRetryPolicy = httpRetryPolicy; + TimeoutPolicy = timeoutPolicy; + CircuitBreakerPolicy = circuitBreakerPolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The optional HTTP retry policy configuration. + [WirePath("httpRetryPolicy")] + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration HttpRetryPolicy { get; set; } + /// The optional timeout policy configuration. + internal DaprComponentResiliencyPolicyTimeoutPolicyConfiguration TimeoutPolicy { get; set; } + /// The optional response timeout in seconds. + [WirePath("timeoutPolicy.responseTimeoutInSeconds")] + public int? ResponseTimeoutInSeconds + { + get => TimeoutPolicy is null ? default : TimeoutPolicy.ResponseTimeoutInSeconds; + set + { + if (TimeoutPolicy is null) + TimeoutPolicy = new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration(); + TimeoutPolicy.ResponseTimeoutInSeconds = value; + } + } + + /// The optional circuit breaker policy configuration. + [WirePath("circuitBreakerPolicy")] + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration CircuitBreakerPolicy { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.Serialization.cs new file mode 100644 index 000000000000..0b92205b4087 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(InitialDelayInMilliseconds)) + { + writer.WritePropertyName("initialDelayInMilliseconds"u8); + writer.WriteNumberValue(InitialDelayInMilliseconds.Value); + } + if (Optional.IsDefined(MaxIntervalInMilliseconds)) + { + writer.WritePropertyName("maxIntervalInMilliseconds"u8); + writer.WriteNumberValue(MaxIntervalInMilliseconds.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(document.RootElement, options); + } + + internal static DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration DeserializeDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? initialDelayInMilliseconds = default; + int? maxIntervalInMilliseconds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("initialDelayInMilliseconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialDelayInMilliseconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxIntervalInMilliseconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxIntervalInMilliseconds = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(initialDelayInMilliseconds, maxIntervalInMilliseconds, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InitialDelayInMilliseconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" initialDelayInMilliseconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InitialDelayInMilliseconds)) + { + builder.Append(" initialDelayInMilliseconds: "); + builder.AppendLine($"{InitialDelayInMilliseconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxIntervalInMilliseconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxIntervalInMilliseconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxIntervalInMilliseconds)) + { + builder.Append(" maxIntervalInMilliseconds: "); + builder.AppendLine($"{MaxIntervalInMilliseconds.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.cs new file mode 100644 index 000000000000..4178ece393be --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Component Resiliency Policy HTTP Retry Backoff Configuration. + public partial class DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + { + } + + /// Initializes a new instance of . + /// The optional initial delay in milliseconds before an operation is retried. + /// The optional maximum time interval in milliseconds between retry attempts. + /// Keeps track of any properties unknown to the library. + internal DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(int? initialDelayInMilliseconds, int? maxIntervalInMilliseconds, IDictionary serializedAdditionalRawData) + { + InitialDelayInMilliseconds = initialDelayInMilliseconds; + MaxIntervalInMilliseconds = maxIntervalInMilliseconds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The optional initial delay in milliseconds before an operation is retried. + [WirePath("initialDelayInMilliseconds")] + public int? InitialDelayInMilliseconds { get; set; } + /// The optional maximum time interval in milliseconds between retry attempts. + [WirePath("maxIntervalInMilliseconds")] + public int? MaxIntervalInMilliseconds { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.Serialization.cs new file mode 100644 index 000000000000..4b8c9e990ffa --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MaxRetries)) + { + writer.WritePropertyName("maxRetries"u8); + writer.WriteNumberValue(MaxRetries.Value); + } + if (Optional.IsDefined(RetryBackOff)) + { + writer.WritePropertyName("retryBackOff"u8); + writer.WriteObjectValue(RetryBackOff, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(document.RootElement, options); + } + + internal static DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration DeserializeDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? maxRetries = default; + DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxRetries"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxRetries = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("retryBackOff"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retryBackOff = DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.DeserializeDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(maxRetries, retryBackOff, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxRetries), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxRetries: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxRetries)) + { + builder.Append(" maxRetries: "); + builder.AppendLine($"{MaxRetries.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RetryBackOff), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" retryBackOff: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RetryBackOff)) + { + builder.Append(" retryBackOff: "); + BicepSerializationHelpers.AppendChildObject(builder, RetryBackOff, options, 2, false, " retryBackOff: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.cs new file mode 100644 index 000000000000..a9aa50db3ebe --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Component Resiliency Policy HTTP Retry Policy Configuration. + public partial class DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration() + { + } + + /// Initializes a new instance of . + /// The optional maximum number of retries. + /// The optional retry backoff configuration. + /// Keeps track of any properties unknown to the library. + internal DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(int? maxRetries, DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff, IDictionary serializedAdditionalRawData) + { + MaxRetries = maxRetries; + RetryBackOff = retryBackOff; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The optional maximum number of retries. + [WirePath("maxRetries")] + public int? MaxRetries { get; set; } + /// The optional retry backoff configuration. + [WirePath("retryBackOff")] + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration RetryBackOff { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.Serialization.cs new file mode 100644 index 000000000000..a8e15cc2d973 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class DaprComponentResiliencyPolicyTimeoutPolicyConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ResponseTimeoutInSeconds)) + { + writer.WritePropertyName("responseTimeoutInSeconds"u8); + writer.WriteNumberValue(ResponseTimeoutInSeconds.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprComponentResiliencyPolicyTimeoutPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentResiliencyPolicyTimeoutPolicyConfiguration(document.RootElement, options); + } + + internal static DaprComponentResiliencyPolicyTimeoutPolicyConfiguration DeserializeDaprComponentResiliencyPolicyTimeoutPolicyConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? responseTimeoutInSeconds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("responseTimeoutInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + responseTimeoutInSeconds = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration(responseTimeoutInSeconds, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResponseTimeoutInSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responseTimeoutInSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResponseTimeoutInSeconds)) + { + builder.Append(" responseTimeoutInSeconds: "); + builder.AppendLine($"{ResponseTimeoutInSeconds.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentResiliencyPolicyTimeoutPolicyConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentResiliencyPolicyTimeoutPolicyConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.cs new file mode 100644 index 000000000000..0b9d5f8f7371 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Component Resiliency Policy Timeout Policy Configuration. + internal partial class DaprComponentResiliencyPolicyTimeoutPolicyConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() + { + } + + /// Initializes a new instance of . + /// The optional response timeout in seconds. + /// Keeps track of any properties unknown to the library. + internal DaprComponentResiliencyPolicyTimeoutPolicyConfiguration(int? responseTimeoutInSeconds, IDictionary serializedAdditionalRawData) + { + ResponseTimeoutInSeconds = responseTimeoutInSeconds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The optional response timeout in seconds. + [WirePath("responseTimeoutInSeconds")] + public int? ResponseTimeoutInSeconds { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentServiceBinding.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentServiceBinding.Serialization.cs new file mode 100644 index 000000000000..37ab3eca5b08 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentServiceBinding.Serialization.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprComponentServiceBinding : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentServiceBinding)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprComponentServiceBinding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprComponentServiceBinding)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprComponentServiceBinding(document.RootElement, options); + } + + internal static DaprComponentServiceBinding DeserializeDaprComponentServiceBinding(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string serviceId = default; + DaprServiceBindMetadata metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceId"u8)) + { + serviceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = DaprServiceBindMetadata.DeserializeDaprServiceBindMetadata(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprComponentServiceBinding(name, serviceId, metadata, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceId)) + { + builder.Append(" serviceId: "); + if (ServiceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceId}'''"); + } + else + { + builder.AppendLine($"'{ServiceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metadata)) + { + builder.Append(" metadata: "); + BicepSerializationHelpers.AppendChildObject(builder, Metadata, options, 2, false, " metadata: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprComponentServiceBinding)} does not support writing '{options.Format}' format."); + } + } + + DaprComponentServiceBinding IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprComponentServiceBinding(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprComponentServiceBinding)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentServiceBinding.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentServiceBinding.cs new file mode 100644 index 000000000000..e934e58b98d3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprComponentServiceBinding.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration to bind a Dapr Component to a dev ContainerApp Service. + public partial class DaprComponentServiceBinding + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprComponentServiceBinding() + { + } + + /// Initializes a new instance of . + /// Name of the service bind. + /// Resource id of the target service. + /// Service bind metadata. + /// Keeps track of any properties unknown to the library. + internal DaprComponentServiceBinding(string name, string serviceId, DaprServiceBindMetadata metadata, IDictionary serializedAdditionalRawData) + { + Name = name; + ServiceId = serviceId; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the service bind. + [WirePath("name")] + public string Name { get; set; } + /// Resource id of the target service. + [WirePath("serviceId")] + public string ServiceId { get; set; } + /// Service bind metadata. + [WirePath("metadata")] + public DaprServiceBindMetadata Metadata { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprServiceBindMetadata.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprServiceBindMetadata.Serialization.cs new file mode 100644 index 000000000000..6d3be062c787 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprServiceBindMetadata.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprServiceBindMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprServiceBindMetadata)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprServiceBindMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprServiceBindMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprServiceBindMetadata(document.RootElement, options); + } + + internal static DaprServiceBindMetadata DeserializeDaprServiceBindMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprServiceBindMetadata(name, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprServiceBindMetadata)} does not support writing '{options.Format}' format."); + } + } + + DaprServiceBindMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprServiceBindMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprServiceBindMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprServiceBindMetadata.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprServiceBindMetadata.cs new file mode 100644 index 000000000000..ebc841283cf4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprServiceBindMetadata.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr component metadata. + public partial class DaprServiceBindMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprServiceBindMetadata() + { + } + + /// Initializes a new instance of . + /// Service bind metadata property name. + /// Service bind metadata property value. + /// Keeps track of any properties unknown to the library. + internal DaprServiceBindMetadata(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Service bind metadata property name. + [WirePath("name")] + public string Name { get; set; } + /// Service bind metadata property value. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionBulkSubscribeConfig.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionBulkSubscribeConfig.Serialization.cs new file mode 100644 index 000000000000..eaaba745350a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionBulkSubscribeConfig.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprSubscriptionBulkSubscribeConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionBulkSubscribeConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(MaxMessagesCount)) + { + writer.WritePropertyName("maxMessagesCount"u8); + writer.WriteNumberValue(MaxMessagesCount.Value); + } + if (Optional.IsDefined(MaxAwaitDurationMs)) + { + writer.WritePropertyName("maxAwaitDurationMs"u8); + writer.WriteNumberValue(MaxAwaitDurationMs.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprSubscriptionBulkSubscribeConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionBulkSubscribeConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprSubscriptionBulkSubscribeConfig(document.RootElement, options); + } + + internal static DaprSubscriptionBulkSubscribeConfig DeserializeDaprSubscriptionBulkSubscribeConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + int? maxMessagesCount = default; + int? maxAwaitDurationMs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxMessagesCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxMessagesCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxAwaitDurationMs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxAwaitDurationMs = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprSubscriptionBulkSubscribeConfig(enabled, maxMessagesCount, maxAwaitDurationMs, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxMessagesCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxMessagesCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxMessagesCount)) + { + builder.Append(" maxMessagesCount: "); + builder.AppendLine($"{MaxMessagesCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxAwaitDurationMs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxAwaitDurationMs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxAwaitDurationMs)) + { + builder.Append(" maxAwaitDurationMs: "); + builder.AppendLine($"{MaxAwaitDurationMs.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprSubscriptionBulkSubscribeConfig)} does not support writing '{options.Format}' format."); + } + } + + DaprSubscriptionBulkSubscribeConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprSubscriptionBulkSubscribeConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprSubscriptionBulkSubscribeConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionBulkSubscribeConfig.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionBulkSubscribeConfig.cs new file mode 100644 index 000000000000..48348602c34e --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionBulkSubscribeConfig.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr PubSub Bulk Subscription Options. + public partial class DaprSubscriptionBulkSubscribeConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprSubscriptionBulkSubscribeConfig() + { + } + + /// Initializes a new instance of . + /// Enable bulk subscription. + /// Maximum number of messages to deliver in a bulk message. + /// Maximum duration in milliseconds to wait before a bulk message is sent to the app. + /// Keeps track of any properties unknown to the library. + internal DaprSubscriptionBulkSubscribeConfig(bool? isEnabled, int? maxMessagesCount, int? maxAwaitDurationMs, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + MaxMessagesCount = maxMessagesCount; + MaxAwaitDurationMs = maxAwaitDurationMs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable bulk subscription. + [WirePath("enabled")] + public bool? IsEnabled { get; set; } + /// Maximum number of messages to deliver in a bulk message. + [WirePath("maxMessagesCount")] + public int? MaxMessagesCount { get; set; } + /// Maximum duration in milliseconds to wait before a bulk message is sent to the app. + [WirePath("maxAwaitDurationMs")] + public int? MaxAwaitDurationMs { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRouteRule.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRouteRule.Serialization.cs new file mode 100644 index 000000000000..629c320ee631 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRouteRule.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprSubscriptionRouteRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionRouteRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Match)) + { + writer.WritePropertyName("match"u8); + writer.WriteStringValue(Match); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprSubscriptionRouteRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionRouteRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprSubscriptionRouteRule(document.RootElement, options); + } + + internal static DaprSubscriptionRouteRule DeserializeDaprSubscriptionRouteRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string match = default; + string path = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("match"u8)) + { + match = property.Value.GetString(); + continue; + } + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprSubscriptionRouteRule(match, path, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Match), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" match: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Match)) + { + builder.Append(" match: "); + if (Match.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Match}'''"); + } + else + { + builder.AppendLine($"'{Match}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprSubscriptionRouteRule)} does not support writing '{options.Format}' format."); + } + } + + DaprSubscriptionRouteRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprSubscriptionRouteRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprSubscriptionRouteRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRouteRule.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRouteRule.cs new file mode 100644 index 000000000000..260c557737c3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRouteRule.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message to a specific path. + public partial class DaprSubscriptionRouteRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprSubscriptionRouteRule() + { + } + + /// Initializes a new instance of . + /// The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. The rules are tested in the order specified, so they should be define from most-to-least specific. The default route should appear last in the list. + /// The path for events that match this rule. + /// Keeps track of any properties unknown to the library. + internal DaprSubscriptionRouteRule(string match, string path, IDictionary serializedAdditionalRawData) + { + Match = match; + Path = path; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. The rules are tested in the order specified, so they should be define from most-to-least specific. The default route should appear last in the list. + [WirePath("match")] + public string Match { get; set; } + /// The path for events that match this rule. + [WirePath("path")] + public string Path { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRoutes.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRoutes.Serialization.cs new file mode 100644 index 000000000000..3aace17e83b2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRoutes.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DaprSubscriptionRoutes : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionRoutes)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteStartArray(); + foreach (var item in Rules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Default)) + { + writer.WritePropertyName("default"u8); + writer.WriteStringValue(Default); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprSubscriptionRoutes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionRoutes)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprSubscriptionRoutes(document.RootElement, options); + } + + internal static DaprSubscriptionRoutes DeserializeDaprSubscriptionRoutes(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList rules = default; + string @default = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DaprSubscriptionRouteRule.DeserializeDaprSubscriptionRouteRule(item, options)); + } + rules = array; + continue; + } + if (property.NameEquals("default"u8)) + { + @default = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprSubscriptionRoutes(rules ?? new ChangeTrackingList(), @default, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Rules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" rules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Rules)) + { + if (Rules.Any()) + { + builder.Append(" rules: "); + builder.AppendLine("["); + foreach (var item in Rules) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " rules: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" default: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Default)) + { + builder.Append(" default: "); + if (Default.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Default}'''"); + } + else + { + builder.AppendLine($"'{Default}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprSubscriptionRoutes)} does not support writing '{options.Format}' format."); + } + } + + DaprSubscriptionRoutes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprSubscriptionRoutes(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprSubscriptionRoutes)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRoutes.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRoutes.cs new file mode 100644 index 000000000000..e8fe9a8e0361 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionRoutes.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr PubSub Event Subscription Routes configuration. + public partial class DaprSubscriptionRoutes + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DaprSubscriptionRoutes() + { + Rules = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of Dapr PubSub Event Subscription Route Rules. + /// The default path to deliver events that do not match any of the rules. + /// Keeps track of any properties unknown to the library. + internal DaprSubscriptionRoutes(IList rules, string @default, IDictionary serializedAdditionalRawData) + { + Rules = rules; + Default = @default; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of Dapr PubSub Event Subscription Route Rules. + [WirePath("rules")] + public IList Rules { get; } + /// The default path to deliver events that do not match any of the rules. + [WirePath("default")] + public string Default { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionsCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionsCollection.Serialization.cs new file mode 100644 index 000000000000..928aae7214ae --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionsCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class DaprSubscriptionsCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionsCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DaprSubscriptionsCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DaprSubscriptionsCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDaprSubscriptionsCollection(document.RootElement, options); + } + + internal static DaprSubscriptionsCollection DeserializeDaprSubscriptionsCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DaprSubscriptionData.DeserializeDaprSubscriptionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DaprSubscriptionsCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DaprSubscriptionsCollection)} does not support writing '{options.Format}' format."); + } + } + + DaprSubscriptionsCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDaprSubscriptionsCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DaprSubscriptionsCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionsCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionsCollection.cs new file mode 100644 index 000000000000..6f0791c2cacb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DaprSubscriptionsCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Dapr Subscriptions ARM resource. + internal partial class DaprSubscriptionsCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal DaprSubscriptionsCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal DaprSubscriptionsCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DaprSubscriptionsCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DataDogConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DataDogConfiguration.Serialization.cs new file mode 100644 index 000000000000..d6cdf8cf66a1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DataDogConfiguration.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DataDogConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataDogConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Site)) + { + writer.WritePropertyName("site"u8); + writer.WriteStringValue(Site); + } + if (Optional.IsDefined(Key)) + { + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataDogConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataDogConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataDogConfiguration(document.RootElement, options); + } + + internal static DataDogConfiguration DeserializeDataDogConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string site = default; + string key = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("site"u8)) + { + site = property.Value.GetString(); + continue; + } + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataDogConfiguration(site, key, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Site), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" site: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Site)) + { + builder.Append(" site: "); + if (Site.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Site}'''"); + } + else + { + builder.AppendLine($"'{Site}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Key), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" key: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Key)) + { + builder.Append(" key: "); + if (Key.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Key}'''"); + } + else + { + builder.AppendLine($"'{Key}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DataDogConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DataDogConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataDogConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataDogConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DataDogConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DataDogConfiguration.cs new file mode 100644 index 000000000000..398040ad826d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DataDogConfiguration.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of datadog. + public partial class DataDogConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataDogConfiguration() + { + } + + /// Initializes a new instance of . + /// The data dog site. + /// The data dog api key. + /// Keeps track of any properties unknown to the library. + internal DataDogConfiguration(string site, string key, IDictionary serializedAdditionalRawData) + { + Site = site; + Key = key; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The data dog site. + [WirePath("site")] + public string Site { get; set; } + /// The data dog api key. + [WirePath("key")] + public string Key { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DestinationsConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DestinationsConfiguration.Serialization.cs new file mode 100644 index 000000000000..0379a4b9e4b6 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DestinationsConfiguration.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DestinationsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DestinationsConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DataDogConfiguration)) + { + writer.WritePropertyName("dataDogConfiguration"u8); + writer.WriteObjectValue(DataDogConfiguration, options); + } + if (Optional.IsCollectionDefined(OtlpConfigurations)) + { + writer.WritePropertyName("otlpConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in OtlpConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DestinationsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DestinationsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDestinationsConfiguration(document.RootElement, options); + } + + internal static DestinationsConfiguration DeserializeDestinationsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataDogConfiguration dataDogConfiguration = default; + IList otlpConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataDogConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataDogConfiguration = DataDogConfiguration.DeserializeDataDogConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("otlpConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OtlpConfiguration.DeserializeOtlpConfiguration(item, options)); + } + otlpConfigurations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DestinationsConfiguration(dataDogConfiguration, otlpConfigurations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DataDogConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dataDogConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DataDogConfiguration)) + { + builder.Append(" dataDogConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, DataDogConfiguration, options, 2, false, " dataDogConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OtlpConfigurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" otlpConfigurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OtlpConfigurations)) + { + if (OtlpConfigurations.Any()) + { + builder.Append(" otlpConfigurations: "); + builder.AppendLine("["); + foreach (var item in OtlpConfigurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " otlpConfigurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DestinationsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DestinationsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDestinationsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DestinationsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DestinationsConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DestinationsConfiguration.cs new file mode 100644 index 000000000000..1a32a9bf4bc3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DestinationsConfiguration.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of Open Telemetry destinations. + public partial class DestinationsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DestinationsConfiguration() + { + OtlpConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Open telemetry datadog destination configuration. + /// Open telemetry otlp configurations. + /// Keeps track of any properties unknown to the library. + internal DestinationsConfiguration(DataDogConfiguration dataDogConfiguration, IList otlpConfigurations, IDictionary serializedAdditionalRawData) + { + DataDogConfiguration = dataDogConfiguration; + OtlpConfigurations = otlpConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Open telemetry datadog destination configuration. + [WirePath("dataDogConfiguration")] + public DataDogConfiguration DataDogConfiguration { get; set; } + /// Open telemetry otlp configurations. + [WirePath("otlpConfigurations")] + public IList OtlpConfigurations { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DetectionStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DetectionStatus.cs new file mode 100644 index 000000000000..d9a9510b9819 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DetectionStatus.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The status of the patch detection. + public readonly partial struct DetectionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DetectionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string RegistryLoginFailedValue = "RegistryLoginFailed"; + private const string FailedValue = "Failed"; + + /// Succeeded. + public static DetectionStatus Succeeded { get; } = new DetectionStatus(SucceededValue); + /// RegistryLoginFailed. + public static DetectionStatus RegistryLoginFailed { get; } = new DetectionStatus(RegistryLoginFailedValue); + /// Failed. + public static DetectionStatus Failed { get; } = new DetectionStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(DetectionStatus left, DetectionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DetectionStatus left, DetectionStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DetectionStatus(string value) => new DetectionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DetectionStatus other && Equals(other); + /// + public bool Equals(DetectionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfiguration.Serialization.cs new file mode 100644 index 000000000000..0415d3a2789e --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfiguration.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class DiskEncryptionConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyVaultConfiguration)) + { + writer.WritePropertyName("keyVaultConfiguration"u8); + writer.WriteObjectValue(KeyVaultConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskEncryptionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskEncryptionConfiguration(document.RootElement, options); + } + + internal static DiskEncryptionConfiguration DeserializeDiskEncryptionConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskEncryptionConfigurationKeyVaultConfiguration keyVaultConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultConfiguration = DiskEncryptionConfigurationKeyVaultConfiguration.DeserializeDiskEncryptionConfigurationKeyVaultConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskEncryptionConfiguration(keyVaultConfiguration, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVaultConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultConfiguration)) + { + builder.Append(" keyVaultConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVaultConfiguration, options, 2, false, " keyVaultConfiguration: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskEncryptionConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskEncryptionConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfiguration.cs new file mode 100644 index 000000000000..372193c25763 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration properties for disk encryption. + internal partial class DiskEncryptionConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskEncryptionConfiguration() + { + } + + /// Initializes a new instance of . + /// The Key Vault that contains your key to use for disk encryption. The Key Vault must be in the same region as the Managed Environment. + /// Keeps track of any properties unknown to the library. + internal DiskEncryptionConfiguration(DiskEncryptionConfigurationKeyVaultConfiguration keyVaultConfiguration, IDictionary serializedAdditionalRawData) + { + KeyVaultConfiguration = keyVaultConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Key Vault that contains your key to use for disk encryption. The Key Vault must be in the same region as the Managed Environment. + [WirePath("keyVaultConfiguration")] + public DiskEncryptionConfigurationKeyVaultConfiguration KeyVaultConfiguration { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfiguration.Serialization.cs new file mode 100644 index 000000000000..867f4868ef82 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfiguration.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DiskEncryptionConfigurationKeyVaultConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyUri)) + { + writer.WritePropertyName("keyUrl"u8); + writer.WriteStringValue(KeyUri.AbsoluteUri); + } + if (Optional.IsDefined(Auth)) + { + writer.WritePropertyName("auth"u8); + writer.WriteObjectValue(Auth, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskEncryptionConfigurationKeyVaultConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskEncryptionConfigurationKeyVaultConfiguration(document.RootElement, options); + } + + internal static DiskEncryptionConfigurationKeyVaultConfiguration DeserializeDiskEncryptionConfigurationKeyVaultConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri keyUrl = default; + DiskEncryptionConfigurationKeyVaultConfigurationAuth auth = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("auth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + auth = DiskEncryptionConfigurationKeyVaultConfigurationAuth.DeserializeDiskEncryptionConfigurationKeyVaultConfigurationAuth(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskEncryptionConfigurationKeyVaultConfiguration(keyUrl, auth, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyUri)) + { + builder.Append(" keyUrl: "); + builder.AppendLine($"'{KeyUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("AuthIdentity", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" auth: "); + builder.AppendLine("{"); + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Auth)) + { + builder.Append(" auth: "); + BicepSerializationHelpers.AppendChildObject(builder, Auth, options, 2, false, " auth: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskEncryptionConfigurationKeyVaultConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskEncryptionConfigurationKeyVaultConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfiguration.cs new file mode 100644 index 000000000000..b1b09385d93c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfiguration.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The Key Vault that contains your key to use for disk encryption. The Key Vault must be in the same region as the Managed Environment. + public partial class DiskEncryptionConfigurationKeyVaultConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskEncryptionConfigurationKeyVaultConfiguration() + { + } + + /// Initializes a new instance of . + /// Key URL pointing to a key in KeyVault. Version segment of the Url is required. + /// Configuration properties for the authentication to the Key Vault. + /// Keeps track of any properties unknown to the library. + internal DiskEncryptionConfigurationKeyVaultConfiguration(Uri keyUri, DiskEncryptionConfigurationKeyVaultConfigurationAuth auth, IDictionary serializedAdditionalRawData) + { + KeyUri = keyUri; + Auth = auth; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Key URL pointing to a key in KeyVault. Version segment of the Url is required. + [WirePath("keyUrl")] + public Uri KeyUri { get; set; } + /// Configuration properties for the authentication to the Key Vault. + internal DiskEncryptionConfigurationKeyVaultConfigurationAuth Auth { get; set; } + /// Resource ID of a user-assigned managed identity to authenticate to the Key Vault. The identity must be assigned to the managed environment, in the same tenant as the Key Vault, and it must have the following key permissions on the Key Vault: wrapkey, unwrapkey, get. + [WirePath("auth.identity")] + public ResourceIdentifier AuthIdentity + { + get => Auth is null ? default : Auth.Identity; + set + { + if (Auth is null) + Auth = new DiskEncryptionConfigurationKeyVaultConfigurationAuth(); + Auth.Identity = value; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfigurationAuth.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfigurationAuth.Serialization.cs new file mode 100644 index 000000000000..c822cb4fc27b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfigurationAuth.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class DiskEncryptionConfigurationKeyVaultConfigurationAuth : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfigurationAuth)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteStringValue(Identity); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskEncryptionConfigurationKeyVaultConfigurationAuth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfigurationAuth)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskEncryptionConfigurationKeyVaultConfigurationAuth(document.RootElement, options); + } + + internal static DiskEncryptionConfigurationKeyVaultConfigurationAuth DeserializeDiskEncryptionConfigurationKeyVaultConfigurationAuth(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier identity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskEncryptionConfigurationKeyVaultConfigurationAuth(identity, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + builder.AppendLine($"'{Identity.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfigurationAuth)} does not support writing '{options.Format}' format."); + } + } + + DiskEncryptionConfigurationKeyVaultConfigurationAuth IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskEncryptionConfigurationKeyVaultConfigurationAuth(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfigurationKeyVaultConfigurationAuth)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfigurationAuth.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfigurationAuth.cs new file mode 100644 index 000000000000..28f625ee71e7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DiskEncryptionConfigurationKeyVaultConfigurationAuth.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration properties for the authentication to the Key Vault. + internal partial class DiskEncryptionConfigurationKeyVaultConfigurationAuth + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskEncryptionConfigurationKeyVaultConfigurationAuth() + { + } + + /// Initializes a new instance of . + /// Resource ID of a user-assigned managed identity to authenticate to the Key Vault. The identity must be assigned to the managed environment, in the same tenant as the Key Vault, and it must have the following key permissions on the Key Vault: wrapkey, unwrapkey, get. + /// Keeps track of any properties unknown to the library. + internal DiskEncryptionConfigurationKeyVaultConfigurationAuth(ResourceIdentifier identity, IDictionary serializedAdditionalRawData) + { + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource ID of a user-assigned managed identity to authenticate to the Key Vault. The identity must be assigned to the managed environment, in the same tenant as the Key Vault, and it must have the following key permissions on the Key Vault: wrapkey, unwrapkey, get. + [WirePath("identity")] + public ResourceIdentifier Identity { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentConfigurationProperty.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentConfigurationProperty.Serialization.cs new file mode 100644 index 000000000000..8f5e6853ef40 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentConfigurationProperty.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DotNetComponentConfigurationProperty : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentConfigurationProperty)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PropertyName)) + { + writer.WritePropertyName("propertyName"u8); + writer.WriteStringValue(PropertyName); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DotNetComponentConfigurationProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentConfigurationProperty)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDotNetComponentConfigurationProperty(document.RootElement, options); + } + + internal static DotNetComponentConfigurationProperty DeserializeDotNetComponentConfigurationProperty(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string propertyName = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("propertyName"u8)) + { + propertyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DotNetComponentConfigurationProperty(propertyName, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PropertyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" propertyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PropertyName)) + { + builder.Append(" propertyName: "); + if (PropertyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PropertyName}'''"); + } + else + { + builder.AppendLine($"'{PropertyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DotNetComponentConfigurationProperty)} does not support writing '{options.Format}' format."); + } + } + + DotNetComponentConfigurationProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDotNetComponentConfigurationProperty(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DotNetComponentConfigurationProperty)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentConfigurationProperty.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentConfigurationProperty.cs new file mode 100644 index 000000000000..522e59ff3b23 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentConfigurationProperty.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration properties for a .NET Component. + public partial class DotNetComponentConfigurationProperty + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DotNetComponentConfigurationProperty() + { + } + + /// Initializes a new instance of . + /// The name of the property. + /// The value of the property. + /// Keeps track of any properties unknown to the library. + internal DotNetComponentConfigurationProperty(string propertyName, string value, IDictionary serializedAdditionalRawData) + { + PropertyName = propertyName; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the property. + [WirePath("propertyName")] + public string PropertyName { get; set; } + /// The value of the property. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentProvisioningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentProvisioningState.cs new file mode 100644 index 000000000000..b1e36e202ab5 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Provisioning state of the .NET Component. + public readonly partial struct DotNetComponentProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DotNetComponentProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string DeletingValue = "Deleting"; + private const string InProgressValue = "InProgress"; + + /// Succeeded. + public static DotNetComponentProvisioningState Succeeded { get; } = new DotNetComponentProvisioningState(SucceededValue); + /// Failed. + public static DotNetComponentProvisioningState Failed { get; } = new DotNetComponentProvisioningState(FailedValue); + /// Canceled. + public static DotNetComponentProvisioningState Canceled { get; } = new DotNetComponentProvisioningState(CanceledValue); + /// Deleting. + public static DotNetComponentProvisioningState Deleting { get; } = new DotNetComponentProvisioningState(DeletingValue); + /// InProgress. + public static DotNetComponentProvisioningState InProgress { get; } = new DotNetComponentProvisioningState(InProgressValue); + /// Determines if two values are the same. + public static bool operator ==(DotNetComponentProvisioningState left, DotNetComponentProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DotNetComponentProvisioningState left, DotNetComponentProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DotNetComponentProvisioningState(string value) => new DotNetComponentProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DotNetComponentProvisioningState other && Equals(other); + /// + public bool Equals(DotNetComponentProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentServiceBind.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentServiceBind.Serialization.cs new file mode 100644 index 000000000000..a3a6a72218d0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentServiceBind.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class DotNetComponentServiceBind : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentServiceBind)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DotNetComponentServiceBind IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentServiceBind)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDotNetComponentServiceBind(document.RootElement, options); + } + + internal static DotNetComponentServiceBind DeserializeDotNetComponentServiceBind(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ResourceIdentifier serviceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DotNetComponentServiceBind(name, serviceId, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceId)) + { + builder.Append(" serviceId: "); + builder.AppendLine($"'{ServiceId.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DotNetComponentServiceBind)} does not support writing '{options.Format}' format."); + } + } + + DotNetComponentServiceBind IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDotNetComponentServiceBind(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DotNetComponentServiceBind)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentServiceBind.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentServiceBind.cs new file mode 100644 index 000000000000..99e30075c140 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentServiceBind.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration to bind a .NET Component to another .NET Component. + public partial class DotNetComponentServiceBind + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DotNetComponentServiceBind() + { + } + + /// Initializes a new instance of . + /// Name of the service bind. + /// Resource id of the target service. + /// Keeps track of any properties unknown to the library. + internal DotNetComponentServiceBind(string name, ResourceIdentifier serviceId, IDictionary serializedAdditionalRawData) + { + Name = name; + ServiceId = serviceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the service bind. + [WirePath("name")] + public string Name { get; set; } + /// Resource id of the target service. + [WirePath("serviceId")] + public ResourceIdentifier ServiceId { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentType.cs new file mode 100644 index 000000000000..9b54570c174b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Type of the .NET Component. + public readonly partial struct DotNetComponentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DotNetComponentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AspireDashboardValue = "AspireDashboard"; + + /// AspireDashboard. + public static DotNetComponentType AspireDashboard { get; } = new DotNetComponentType(AspireDashboardValue); + /// Determines if two values are the same. + public static bool operator ==(DotNetComponentType left, DotNetComponentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DotNetComponentType left, DotNetComponentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DotNetComponentType(string value) => new DotNetComponentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DotNetComponentType other && Equals(other); + /// + public bool Equals(DotNetComponentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentsCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentsCollection.Serialization.cs new file mode 100644 index 000000000000..ed92af6edf1a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentsCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class DotNetComponentsCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentsCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DotNetComponentsCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DotNetComponentsCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDotNetComponentsCollection(document.RootElement, options); + } + + internal static DotNetComponentsCollection DeserializeDotNetComponentsCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DotNetComponentData.DeserializeDotNetComponentData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DotNetComponentsCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DotNetComponentsCollection)} does not support writing '{options.Format}' format."); + } + } + + DotNetComponentsCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDotNetComponentsCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DotNetComponentsCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentsCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentsCollection.cs new file mode 100644 index 000000000000..0dc3b14763e8 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/DotNetComponentsCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// .NET Components ARM resource. + internal partial class DotNetComponentsCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal DotNetComponentsCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal DotNetComponentsCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DotNetComponentsCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentVariable.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentVariable.Serialization.cs new file mode 100644 index 000000000000..4e911a715391 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentVariable.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class EnvironmentVariable : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentVariable)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnvironmentVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentVariable)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnvironmentVariable(document.RootElement, options); + } + + internal static EnvironmentVariable DeserializeEnvironmentVariable(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnvironmentVariable(name, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(EnvironmentVariable)} does not support writing '{options.Format}' format."); + } + } + + EnvironmentVariable IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEnvironmentVariable(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnvironmentVariable)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentVariable.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentVariable.cs new file mode 100644 index 000000000000..4fcfd3ddf6e0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/EnvironmentVariable.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Model representing an environment variable. + public partial class EnvironmentVariable + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Environment variable name. + /// Environment variable value. + /// or is null. + public EnvironmentVariable(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// Environment variable name. + /// Environment variable value. + /// Keeps track of any properties unknown to the library. + internal EnvironmentVariable(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EnvironmentVariable() + { + } + + /// Environment variable name. + [WirePath("name")] + public string Name { get; set; } + /// Environment variable value. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ExecutionStatus.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ExecutionStatus.Serialization.cs new file mode 100644 index 000000000000..8580aac4745b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ExecutionStatus.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class ExecutionStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExecutionStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Replicas)) + { + writer.WritePropertyName("replicas"u8); + writer.WriteStartArray(); + foreach (var item in Replicas) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExecutionStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExecutionStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExecutionStatus(document.RootElement, options); + } + + internal static ExecutionStatus DeserializeExecutionStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList replicas = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("replicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ReplicaExecutionStatus.DeserializeReplicaExecutionStatus(item, options)); + } + replicas = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExecutionStatus(replicas ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Replicas), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" replicas: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Replicas)) + { + if (Replicas.Any()) + { + builder.Append(" replicas: "); + builder.AppendLine("["); + foreach (var item in Replicas) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " replicas: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ExecutionStatus)} does not support writing '{options.Format}' format."); + } + } + + ExecutionStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExecutionStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExecutionStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ExecutionStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ExecutionStatus.cs new file mode 100644 index 000000000000..382e07ead5ea --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ExecutionStatus.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Job execution status. + internal partial class ExecutionStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ExecutionStatus() + { + Replicas = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Replicas in the execution. + /// Keeps track of any properties unknown to the library. + internal ExecutionStatus(IReadOnlyList replicas, IDictionary serializedAdditionalRawData) + { + Replicas = replicas; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Replicas in the execution. + [WirePath("replicas")] + public IReadOnlyList Replicas { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Header.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Header.Serialization.cs new file mode 100644 index 000000000000..5df3c8bed868 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Header.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class Header : IUtf8JsonSerializable, IJsonModel
+ { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel
)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel
.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel
)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Header)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Key)) + { + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Header IJsonModel
.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel
)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Header)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHeader(document.RootElement, options); + } + + internal static Header DeserializeHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string key = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Header(key, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Key), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" key: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Key)) + { + builder.Append(" key: "); + if (Key.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Key}'''"); + } + else + { + builder.AppendLine($"'{Key}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel
.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel
)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(Header)} does not support writing '{options.Format}' format."); + } + } + + Header IPersistableModel
.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel
)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Header)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel
.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Header.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Header.cs new file mode 100644 index 000000000000..d458be50100d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Header.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Header of otlp configuration. + public partial class Header + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public Header() + { + } + + /// Initializes a new instance of . + /// The key of otlp configuration header. + /// The value of otlp configuration header. + /// Keeps track of any properties unknown to the library. + internal Header(string key, string value, IDictionary serializedAdditionalRawData) + { + Key = key; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key of otlp configuration header. + [WirePath("key")] + public string Key { get; set; } + /// The value of otlp configuration header. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HeaderMatch.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HeaderMatch.Serialization.cs new file mode 100644 index 000000000000..0381b64599e1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HeaderMatch.Serialization.cs @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class HeaderMatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HeaderMatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Header)) + { + writer.WritePropertyName("header"u8); + writer.WriteStringValue(Header); + } + writer.WritePropertyName("match"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ExactMatch)) + { + writer.WritePropertyName("exactMatch"u8); + writer.WriteStringValue(ExactMatch); + } + if (Optional.IsDefined(PrefixMatch)) + { + writer.WritePropertyName("prefixMatch"u8); + writer.WriteStringValue(PrefixMatch); + } + if (Optional.IsDefined(SuffixMatch)) + { + writer.WritePropertyName("suffixMatch"u8); + writer.WriteStringValue(SuffixMatch); + } + if (Optional.IsDefined(RegexMatch)) + { + writer.WritePropertyName("regexMatch"u8); + writer.WriteStringValue(RegexMatch); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HeaderMatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HeaderMatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHeaderMatch(document.RootElement, options); + } + + internal static HeaderMatch DeserializeHeaderMatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string header = default; + string exactMatch = default; + string prefixMatch = default; + string suffixMatch = default; + string regexMatch = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("header"u8)) + { + header = property.Value.GetString(); + continue; + } + if (property.NameEquals("match"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("exactMatch"u8)) + { + exactMatch = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("prefixMatch"u8)) + { + prefixMatch = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("suffixMatch"u8)) + { + suffixMatch = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("regexMatch"u8)) + { + regexMatch = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HeaderMatch( + header, + exactMatch, + prefixMatch, + suffixMatch, + regexMatch, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Header), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" header: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Header)) + { + builder.Append(" header: "); + if (Header.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Header}'''"); + } + else + { + builder.AppendLine($"'{Header}'"); + } + } + } + + builder.Append(" match:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExactMatch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" exactMatch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExactMatch)) + { + builder.Append(" exactMatch: "); + if (ExactMatch.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExactMatch}'''"); + } + else + { + builder.AppendLine($"'{ExactMatch}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrefixMatch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" prefixMatch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrefixMatch)) + { + builder.Append(" prefixMatch: "); + if (PrefixMatch.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrefixMatch}'''"); + } + else + { + builder.AppendLine($"'{PrefixMatch}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuffixMatch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" suffixMatch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SuffixMatch)) + { + builder.Append(" suffixMatch: "); + if (SuffixMatch.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SuffixMatch}'''"); + } + else + { + builder.AppendLine($"'{SuffixMatch}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RegexMatch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" regexMatch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RegexMatch)) + { + builder.Append(" regexMatch: "); + if (RegexMatch.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RegexMatch}'''"); + } + else + { + builder.AppendLine($"'{RegexMatch}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HeaderMatch)} does not support writing '{options.Format}' format."); + } + } + + HeaderMatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHeaderMatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HeaderMatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HeaderMatch.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HeaderMatch.cs new file mode 100644 index 000000000000..117bcef06444 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HeaderMatch.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Conditions required to match a header. + public partial class HeaderMatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public HeaderMatch() + { + } + + /// Initializes a new instance of . + /// Name of the header. + /// Exact value of the header. + /// Prefix value of the header. + /// Suffix value of the header. + /// Regex value of the header. + /// Keeps track of any properties unknown to the library. + internal HeaderMatch(string header, string exactMatch, string prefixMatch, string suffixMatch, string regexMatch, IDictionary serializedAdditionalRawData) + { + Header = header; + ExactMatch = exactMatch; + PrefixMatch = prefixMatch; + SuffixMatch = suffixMatch; + RegexMatch = regexMatch; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the header. + [WirePath("header")] + public string Header { get; set; } + /// Exact value of the header. + [WirePath("match.exactMatch")] + public string ExactMatch { get; set; } + /// Prefix value of the header. + [WirePath("match.prefixMatch")] + public string PrefixMatch { get; set; } + /// Suffix value of the header. + [WirePath("match.suffixMatch")] + public string SuffixMatch { get; set; } + /// Regex value of the header. + [WirePath("match.regexMatch")] + public string RegexMatch { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpConnectionPool.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpConnectionPool.Serialization.cs new file mode 100644 index 000000000000..52730459c1a8 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpConnectionPool.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class HttpConnectionPool : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpConnectionPool)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Http1MaxPendingRequests)) + { + writer.WritePropertyName("http1MaxPendingRequests"u8); + writer.WriteNumberValue(Http1MaxPendingRequests.Value); + } + if (Optional.IsDefined(Http2MaxRequests)) + { + writer.WritePropertyName("http2MaxRequests"u8); + writer.WriteNumberValue(Http2MaxRequests.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HttpConnectionPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpConnectionPool)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHttpConnectionPool(document.RootElement, options); + } + + internal static HttpConnectionPool DeserializeHttpConnectionPool(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? http1MaxPendingRequests = default; + int? http2MaxRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("http1MaxPendingRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + http1MaxPendingRequests = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("http2MaxRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + http2MaxRequests = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HttpConnectionPool(http1MaxPendingRequests, http2MaxRequests, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Http1MaxPendingRequests), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" http1MaxPendingRequests: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Http1MaxPendingRequests)) + { + builder.Append(" http1MaxPendingRequests: "); + builder.AppendLine($"{Http1MaxPendingRequests.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Http2MaxRequests), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" http2MaxRequests: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Http2MaxRequests)) + { + builder.Append(" http2MaxRequests: "); + builder.AppendLine($"{Http2MaxRequests.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HttpConnectionPool)} does not support writing '{options.Format}' format."); + } + } + + HttpConnectionPool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHttpConnectionPool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HttpConnectionPool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpConnectionPool.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpConnectionPool.cs new file mode 100644 index 000000000000..54d24929a7f0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpConnectionPool.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Defines parameters for http connection pooling. + public partial class HttpConnectionPool + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public HttpConnectionPool() + { + } + + /// Initializes a new instance of . + /// Maximum number of pending http1 requests allowed. + /// Maximum number of http2 requests allowed. + /// Keeps track of any properties unknown to the library. + internal HttpConnectionPool(int? http1MaxPendingRequests, int? http2MaxRequests, IDictionary serializedAdditionalRawData) + { + Http1MaxPendingRequests = http1MaxPendingRequests; + Http2MaxRequests = http2MaxRequests; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Maximum number of pending http1 requests allowed. + [WirePath("http1MaxPendingRequests")] + public int? Http1MaxPendingRequests { get; set; } + /// Maximum number of http2 requests allowed. + [WirePath("http2MaxRequests")] + public int? Http2MaxRequests { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpGet.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpGet.Serialization.cs new file mode 100644 index 000000000000..efeff19df792 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpGet.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class HttpGet : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpGet)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(FileName)) + { + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + } + if (Optional.IsCollectionDefined(Headers)) + { + writer.WritePropertyName("headers"u8); + writer.WriteStartArray(); + foreach (var item in Headers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HttpGet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpGet)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHttpGet(document.RootElement, options); + } + + internal static HttpGet DeserializeHttpGet(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri url = default; + string fileName = default; + IList headers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("headers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + headers = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HttpGet(url, fileName, headers ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FileName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" fileName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FileName)) + { + builder.Append(" fileName: "); + if (FileName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FileName}'''"); + } + else + { + builder.AppendLine($"'{FileName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HttpGet)} does not support writing '{options.Format}' format."); + } + } + + HttpGet IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHttpGet(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HttpGet)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpGet.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpGet.cs new file mode 100644 index 000000000000..3cde1b7759e9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpGet.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Model representing a http get request. + public partial class HttpGet + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// URL to make HTTP GET request against. + /// is null. + public HttpGet(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + Headers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// URL to make HTTP GET request against. + /// Name of the file that the request should be saved to. + /// List of headers to send with the request. + /// Keeps track of any properties unknown to the library. + internal HttpGet(Uri uri, string fileName, IList headers, IDictionary serializedAdditionalRawData) + { + Uri = uri; + FileName = fileName; + Headers = headers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HttpGet() + { + } + + /// URL to make HTTP GET request against. + [WirePath("url")] + public Uri Uri { get; set; } + /// Name of the file that the request should be saved to. + [WirePath("fileName")] + public string FileName { get; set; } + /// List of headers to send with the request. + [WirePath("headers")] + public IList Headers { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRetryPolicy.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRetryPolicy.Serialization.cs new file mode 100644 index 000000000000..8808dd3aaaa4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRetryPolicy.Serialization.cs @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class HttpRetryPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpRetryPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MaxRetries)) + { + writer.WritePropertyName("maxRetries"u8); + writer.WriteNumberValue(MaxRetries.Value); + } + writer.WritePropertyName("matches"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Headers)) + { + writer.WritePropertyName("headers"u8); + writer.WriteStartArray(); + foreach (var item in Headers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(HttpStatusCodes)) + { + writer.WritePropertyName("httpStatusCodes"u8); + writer.WriteStartArray(); + foreach (var item in HttpStatusCodes) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WritePropertyName("retryBackOff"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(InitialDelayInMilliseconds)) + { + writer.WritePropertyName("initialDelayInMilliseconds"u8); + writer.WriteNumberValue(InitialDelayInMilliseconds.Value); + } + if (Optional.IsDefined(MaxIntervalInMilliseconds)) + { + writer.WritePropertyName("maxIntervalInMilliseconds"u8); + writer.WriteNumberValue(MaxIntervalInMilliseconds.Value); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HttpRetryPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpRetryPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHttpRetryPolicy(document.RootElement, options); + } + + internal static HttpRetryPolicy DeserializeHttpRetryPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? maxRetries = default; + IList headers = default; + IList httpStatusCodes = default; + IList errors = default; + long? initialDelayInMilliseconds = default; + long? maxIntervalInMilliseconds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxRetries"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxRetries = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("matches"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("headers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(HeaderMatch.DeserializeHeaderMatch(item, options)); + } + headers = array; + continue; + } + if (property0.NameEquals("httpStatusCodes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + httpStatusCodes = array; + continue; + } + if (property0.NameEquals("errors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + errors = array; + continue; + } + } + continue; + } + if (property.NameEquals("retryBackOff"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("initialDelayInMilliseconds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialDelayInMilliseconds = property0.Value.GetInt64(); + continue; + } + if (property0.NameEquals("maxIntervalInMilliseconds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxIntervalInMilliseconds = property0.Value.GetInt64(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HttpRetryPolicy( + maxRetries, + headers ?? new ChangeTrackingList(), + httpStatusCodes ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + initialDelayInMilliseconds, + maxIntervalInMilliseconds, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxRetries), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxRetries: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxRetries)) + { + builder.Append(" maxRetries: "); + builder.AppendLine($"{MaxRetries.Value}"); + } + } + + builder.Append(" matches:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " headers: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpStatusCodes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpStatusCodes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(HttpStatusCodes)) + { + if (HttpStatusCodes.Any()) + { + builder.Append(" httpStatusCodes: "); + builder.AppendLine("["); + foreach (var item in HttpStatusCodes) + { + builder.AppendLine($" {item}"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Errors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Errors)) + { + if (Errors.Any()) + { + builder.Append(" errors: "); + builder.AppendLine("["); + foreach (var item in Errors) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.Append(" retryBackOff:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InitialDelayInMilliseconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" initialDelayInMilliseconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InitialDelayInMilliseconds)) + { + builder.Append(" initialDelayInMilliseconds: "); + builder.AppendLine($"'{InitialDelayInMilliseconds.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxIntervalInMilliseconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxIntervalInMilliseconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxIntervalInMilliseconds)) + { + builder.Append(" maxIntervalInMilliseconds: "); + builder.AppendLine($"'{MaxIntervalInMilliseconds.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HttpRetryPolicy)} does not support writing '{options.Format}' format."); + } + } + + HttpRetryPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHttpRetryPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HttpRetryPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRetryPolicy.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRetryPolicy.cs new file mode 100644 index 000000000000..94dbfa60f2a8 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRetryPolicy.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Policy that defines http request retry conditions. + public partial class HttpRetryPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public HttpRetryPolicy() + { + Headers = new ChangeTrackingList(); + HttpStatusCodes = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Maximum number of times a request will retry. + /// Headers that must be present for a request to be retried. + /// Additional http status codes that can trigger a retry. + /// Errors that can trigger a retry. + /// Initial delay, in milliseconds, before retrying a request. + /// Maximum interval, in milliseconds, between retries. + /// Keeps track of any properties unknown to the library. + internal HttpRetryPolicy(int? maxRetries, IList headers, IList httpStatusCodes, IList errors, long? initialDelayInMilliseconds, long? maxIntervalInMilliseconds, IDictionary serializedAdditionalRawData) + { + MaxRetries = maxRetries; + Headers = headers; + HttpStatusCodes = httpStatusCodes; + Errors = errors; + InitialDelayInMilliseconds = initialDelayInMilliseconds; + MaxIntervalInMilliseconds = maxIntervalInMilliseconds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Maximum number of times a request will retry. + [WirePath("maxRetries")] + public int? MaxRetries { get; set; } + /// Headers that must be present for a request to be retried. + [WirePath("matches.headers")] + public IList Headers { get; } + /// Additional http status codes that can trigger a retry. + [WirePath("matches.httpStatusCodes")] + public IList HttpStatusCodes { get; } + /// Errors that can trigger a retry. + [WirePath("matches.errors")] + public IList Errors { get; } + /// Initial delay, in milliseconds, before retrying a request. + [WirePath("retryBackOff.initialDelayInMilliseconds")] + public long? InitialDelayInMilliseconds { get; set; } + /// Maximum interval, in milliseconds, between retries. + [WirePath("retryBackOff.maxIntervalInMilliseconds")] + public long? MaxIntervalInMilliseconds { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRouteConfigCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRouteConfigCollection.cs index 73cf9e16bcc9..89f9ab0a4082 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRouteConfigCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/HttpRouteConfigCollection.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - /// Collection of rule based Http Route Config resources. + /// Collection of Advanced Ingress Routing Config resources. internal partial class HttpRouteConfigCollection { /// diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ImageType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ImageType.cs new file mode 100644 index 000000000000..1140fe532b34 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ImageType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update image through image field. Set to ContainerImage for user provided image. + public readonly partial struct ImageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CloudBuildValue = "CloudBuild"; + private const string ContainerImageValue = "ContainerImage"; + + /// CloudBuild. + public static ImageType CloudBuild { get; } = new ImageType(CloudBuildValue); + /// ContainerImage. + public static ImageType ContainerImage { get; } = new ImageType(ContainerImageValue); + /// Determines if two values are the same. + public static bool operator ==(ImageType left, ImageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImageType left, ImageType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ImageType(string value) => new ImageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImageType other && Equals(other); + /// + public bool Equals(ImageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressConfigurationScale.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressConfigurationScale.Serialization.cs new file mode 100644 index 000000000000..5ec4755167e7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressConfigurationScale.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class IngressConfigurationScale : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IngressConfigurationScale)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MinReplicas)) + { + writer.WritePropertyName("minReplicas"u8); + writer.WriteNumberValue(MinReplicas.Value); + } + if (Optional.IsDefined(MaxReplicas)) + { + writer.WritePropertyName("maxReplicas"u8); + writer.WriteNumberValue(MaxReplicas.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IngressConfigurationScale IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IngressConfigurationScale)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIngressConfigurationScale(document.RootElement, options); + } + + internal static IngressConfigurationScale DeserializeIngressConfigurationScale(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? minReplicas = default; + int? maxReplicas = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minReplicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxReplicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxReplicas = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IngressConfigurationScale(minReplicas, maxReplicas, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinReplicas), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minReplicas: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinReplicas)) + { + builder.Append(" minReplicas: "); + builder.AppendLine($"{MinReplicas.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxReplicas), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxReplicas: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxReplicas)) + { + builder.Append(" maxReplicas: "); + builder.AppendLine($"{MaxReplicas.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(IngressConfigurationScale)} does not support writing '{options.Format}' format."); + } + } + + IngressConfigurationScale IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeIngressConfigurationScale(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IngressConfigurationScale)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressConfigurationScale.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressConfigurationScale.cs new file mode 100644 index 000000000000..6e2bd65690c3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressConfigurationScale.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Scaling configuration for the ingress component. Required. + public partial class IngressConfigurationScale + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public IngressConfigurationScale() + { + } + + /// Initializes a new instance of . + /// Minimum number of ingress replicas. Must be at least 2. Required. + /// Maximum number of ingress replicas. Must be greater than or equal to minReplicas. + /// Keeps track of any properties unknown to the library. + internal IngressConfigurationScale(int? minReplicas, int? maxReplicas, IDictionary serializedAdditionalRawData) + { + MinReplicas = minReplicas; + MaxReplicas = maxReplicas; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Minimum number of ingress replicas. Must be at least 2. Required. + [WirePath("minReplicas")] + public int? MinReplicas { get; set; } + /// Maximum number of ingress replicas. Must be greater than or equal to minReplicas. + [WirePath("maxReplicas")] + public int? MaxReplicas { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressTargetPortHttpScheme.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressTargetPortHttpScheme.cs new file mode 100644 index 000000000000..1dd214a8ead3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/IngressTargetPortHttpScheme.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Whether an http app listens on http or https. + public readonly partial struct IngressTargetPortHttpScheme : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IngressTargetPortHttpScheme(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HttpValue = "http"; + private const string HttpsValue = "https"; + + /// http. + public static IngressTargetPortHttpScheme Http { get; } = new IngressTargetPortHttpScheme(HttpValue); + /// https. + public static IngressTargetPortHttpScheme Https { get; } = new IngressTargetPortHttpScheme(HttpsValue); + /// Determines if two values are the same. + public static bool operator ==(IngressTargetPortHttpScheme left, IngressTargetPortHttpScheme right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IngressTargetPortHttpScheme left, IngressTargetPortHttpScheme right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IngressTargetPortHttpScheme(string value) => new IngressTargetPortHttpScheme(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IngressTargetPortHttpScheme other && Equals(other); + /// + public bool Equals(IngressTargetPortHttpScheme other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.Serialization.cs index 02f986d65a4c..b39b2ad9fab5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.Serialization.cs @@ -110,9 +110,11 @@ internal static JavaComponentProperties DeserializeJavaComponentProperties(JsonE { switch (discriminator.GetString()) { + case "Nacos": return NacosComponent.DeserializeNacosComponent(element, options); case "SpringBootAdmin": return SpringBootAdminComponent.DeserializeSpringBootAdminComponent(element, options); case "SpringCloudConfig": return SpringCloudConfigComponent.DeserializeSpringCloudConfigComponent(element, options); case "SpringCloudEureka": return SpringCloudEurekaComponent.DeserializeSpringCloudEurekaComponent(element, options); + case "SpringCloudGateway": return SpringCloudGatewayComponent.DeserializeSpringCloudGatewayComponent(element, options); } } return UnknownJavaComponentProperties.DeserializeUnknownJavaComponentProperties(element, options); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.cs index 7845feedd75c..d6db41c58774 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentProperties.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.AppContainers.Models /// /// Java Component common properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , , and . /// public abstract partial class JavaComponentProperties { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentType.cs index bcb3b64582d6..60c6f38c5a39 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentType.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JavaComponentType.cs @@ -25,6 +25,8 @@ public JavaComponentType(string value) private const string SpringBootAdminValue = "SpringBootAdmin"; private const string SpringCloudEurekaValue = "SpringCloudEureka"; private const string SpringCloudConfigValue = "SpringCloudConfig"; + private const string SpringCloudGatewayValue = "SpringCloudGateway"; + private const string NacosValue = "Nacos"; /// SpringBootAdmin. public static JavaComponentType SpringBootAdmin { get; } = new JavaComponentType(SpringBootAdminValue); @@ -32,6 +34,10 @@ public JavaComponentType(string value) public static JavaComponentType SpringCloudEureka { get; } = new JavaComponentType(SpringCloudEurekaValue); /// SpringCloudConfig. public static JavaComponentType SpringCloudConfig { get; } = new JavaComponentType(SpringCloudConfigValue); + /// SpringCloudGateway. + public static JavaComponentType SpringCloudGateway { get; } = new JavaComponentType(SpringCloudGatewayValue); + /// Nacos. + public static JavaComponentType Nacos { get; } = new JavaComponentType(NacosValue); /// Determines if two values are the same. public static bool operator ==(JavaComponentType left, JavaComponentType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobRunningState.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobRunningState.cs new file mode 100644 index 000000000000..2d0d277ad2cd --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/JobRunningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Current running state of the job. + public readonly partial struct JobRunningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobRunningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadyValue = "Ready"; + private const string ProgressingValue = "Progressing"; + private const string SuspendedValue = "Suspended"; + + /// Ready. + public static JobRunningState Ready { get; } = new JobRunningState(ReadyValue); + /// Progressing. + public static JobRunningState Progressing { get; } = new JobRunningState(ProgressingValue); + /// Suspended. + public static JobRunningState Suspended { get; } = new JobRunningState(SuspendedValue); + /// Determines if two values are the same. + public static bool operator ==(JobRunningState left, JobRunningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobRunningState left, JobRunningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator JobRunningState(string value) => new JobRunningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobRunningState other && Equals(other); + /// + public bool Equals(JobRunningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryCollection.Serialization.cs new file mode 100644 index 000000000000..194896a36468 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class LabelHistoryCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LabelHistoryCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLabelHistoryCollection(document.RootElement, options); + } + + internal static LabelHistoryCollection DeserializeLabelHistoryCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LabelHistoryData.DeserializeLabelHistoryData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LabelHistoryCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(LabelHistoryCollection)} does not support writing '{options.Format}' format."); + } + } + + LabelHistoryCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLabelHistoryCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LabelHistoryCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryCollection.cs new file mode 100644 index 000000000000..bd1d8c5a556e --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App Label History collection ARM resource. + internal partial class LabelHistoryCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal LabelHistoryCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal LabelHistoryCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LabelHistoryCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryProperties.Serialization.cs new file mode 100644 index 000000000000..c6ba8a3380dc --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryProperties.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class LabelHistoryProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsCollectionDefined(Records)) + { + writer.WritePropertyName("records"u8); + writer.WriteStartArray(); + foreach (var item in Records) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LabelHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLabelHistoryProperties(document.RootElement, options); + } + + internal static LabelHistoryProperties DeserializeLabelHistoryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList records = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("records"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LabelHistoryRecordItem.DeserializeLabelHistoryRecordItem(item, options)); + } + records = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LabelHistoryProperties(records ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Records), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" records: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Records)) + { + if (Records.Any()) + { + builder.Append(" records: "); + builder.AppendLine("["); + foreach (var item in Records) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " records: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(LabelHistoryProperties)} does not support writing '{options.Format}' format."); + } + } + + LabelHistoryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLabelHistoryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LabelHistoryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryProperties.cs new file mode 100644 index 000000000000..b23a01246b07 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryProperties.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App Label History resource specific properties. + internal partial class LabelHistoryProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LabelHistoryProperties() + { + Records = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of label history records. + /// Keeps track of any properties unknown to the library. + internal LabelHistoryProperties(IReadOnlyList records, IDictionary serializedAdditionalRawData) + { + Records = records; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of label history records. + [WirePath("records")] + public IReadOnlyList Records { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryRecordItem.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryRecordItem.Serialization.cs new file mode 100644 index 000000000000..d7603bf1dced --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryRecordItem.Serialization.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class LabelHistoryRecordItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryRecordItem)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Revision)) + { + writer.WritePropertyName("revision"u8); + writer.WriteStringValue(Revision); + } + if (options.Format != "W" && Optional.IsDefined(Start)) + { + writer.WritePropertyName("start"u8); + writer.WriteStringValue(Start.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Stop)) + { + writer.WritePropertyName("stop"u8); + writer.WriteStringValue(Stop.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LabelHistoryRecordItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LabelHistoryRecordItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLabelHistoryRecordItem(document.RootElement, options); + } + + internal static LabelHistoryRecordItem DeserializeLabelHistoryRecordItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string revision = default; + DateTimeOffset? start = default; + DateTimeOffset? stop = default; + Status? status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("revision"u8)) + { + revision = property.Value.GetString(); + continue; + } + if (property.NameEquals("start"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + start = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("stop"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stop = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new Status(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LabelHistoryRecordItem(revision, start, stop, status, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Revision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" revision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Revision)) + { + builder.Append(" revision: "); + if (Revision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Revision}'''"); + } + else + { + builder.AppendLine($"'{Revision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Start), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" start: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Start)) + { + builder.Append(" start: "); + var formattedDateTimeString = TypeFormatters.ToString(Start.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Stop), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" stop: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Stop)) + { + builder.Append(" stop: "); + var formattedDateTimeString = TypeFormatters.ToString(Stop.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(LabelHistoryRecordItem)} does not support writing '{options.Format}' format."); + } + } + + LabelHistoryRecordItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLabelHistoryRecordItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LabelHistoryRecordItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryRecordItem.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryRecordItem.cs new file mode 100644 index 000000000000..ad0fc1f125a4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LabelHistoryRecordItem.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App Label History Item resource specific properties. + public partial class LabelHistoryRecordItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal LabelHistoryRecordItem() + { + } + + /// Initializes a new instance of . + /// Container App revision name that label was applied to. + /// Timestamp describing when the label was applied to the revision. + /// Timestamp describing when the label was removed from the revision. Only meaningful when the label is currently applied to the revision. + /// Status of the label history record. + /// Keeps track of any properties unknown to the library. + internal LabelHistoryRecordItem(string revision, DateTimeOffset? start, DateTimeOffset? stop, Status? status, IDictionary serializedAdditionalRawData) + { + Revision = revision; + Start = start; + Stop = stop; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Container App revision name that label was applied to. + [WirePath("revision")] + public string Revision { get; } + /// Timestamp describing when the label was applied to the revision. + [WirePath("start")] + public DateTimeOffset? Start { get; } + /// Timestamp describing when the label was removed from the revision. Only meaningful when the label is currently applied to the revision. + [WirePath("stop")] + public DateTimeOffset? Stop { get; } + /// Status of the label history record. + [WirePath("status")] + public Status? Status { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Level.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Level.cs new file mode 100644 index 000000000000..cd97886d91bd --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Level.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The specified logger's log level. + public readonly partial struct Level : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Level(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OffValue = "off"; + private const string ErrorValue = "error"; + private const string InfoValue = "info"; + private const string DebugValue = "debug"; + private const string TraceValue = "trace"; + private const string WarnValue = "warn"; + + /// off. + public static Level Off { get; } = new Level(OffValue); + /// error. + public static Level Error { get; } = new Level(ErrorValue); + /// info. + public static Level Info { get; } = new Level(InfoValue); + /// debug. + public static Level Debug { get; } = new Level(DebugValue); + /// trace. + public static Level Trace { get; } = new Level(TraceValue); + /// warn. + public static Level Warn { get; } = new Level(WarnValue); + /// Determines if two values are the same. + public static bool operator ==(Level left, Level right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Level left, Level right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Level(string value) => new Level(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Level other && Equals(other); + /// + public bool Equals(Level other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LoggerSetting.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LoggerSetting.Serialization.cs new file mode 100644 index 000000000000..ab9ce84c9a29 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LoggerSetting.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class LoggerSetting : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoggerSetting)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("logger"u8); + writer.WriteStringValue(Logger); + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LoggerSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoggerSetting)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoggerSetting(document.RootElement, options); + } + + internal static LoggerSetting DeserializeLoggerSetting(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string logger = default; + Level level = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("logger"u8)) + { + logger = property.Value.GetString(); + continue; + } + if (property.NameEquals("level"u8)) + { + level = new Level(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoggerSetting(logger, level, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Logger), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logger: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Logger)) + { + builder.Append(" logger: "); + if (Logger.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Logger}'''"); + } + else + { + builder.AppendLine($"'{Logger}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Level), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" level: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" level: "); + builder.AppendLine($"'{Level.ToString()}'"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(LoggerSetting)} does not support writing '{options.Format}' format."); + } + } + + LoggerSetting IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLoggerSetting(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoggerSetting)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LoggerSetting.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LoggerSetting.cs new file mode 100644 index 000000000000..f7ab6638260b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LoggerSetting.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Logger settings for java workloads. + public partial class LoggerSetting + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Logger name. + /// The specified logger's log level. + /// is null. + public LoggerSetting(string logger, Level level) + { + Argument.AssertNotNull(logger, nameof(logger)); + + Logger = logger; + Level = level; + } + + /// Initializes a new instance of . + /// Logger name. + /// The specified logger's log level. + /// Keeps track of any properties unknown to the library. + internal LoggerSetting(string logger, Level level, IDictionary serializedAdditionalRawData) + { + Logger = logger; + Level = level; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LoggerSetting() + { + } + + /// Logger name. + [WirePath("logger")] + public string Logger { get; set; } + /// The specified logger's log level. + [WirePath("level")] + public Level Level { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowEnvelopeProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowEnvelopeProperties.cs index 8520a190d436..6a32187e9a16 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowEnvelopeProperties.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowEnvelopeProperties.cs @@ -46,7 +46,7 @@ public partial class LogicAppWorkflowEnvelopeProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public LogicAppWorkflowEnvelopeProperties() + internal LogicAppWorkflowEnvelopeProperties() { } @@ -94,12 +94,12 @@ internal LogicAppWorkflowEnvelopeProperties(BinaryData files, LogicAppWorkflowSt /// /// [WirePath("files")] - public BinaryData Files { get; set; } + public BinaryData Files { get; } /// Gets or sets the state of the workflow. [WirePath("flowState")] - public LogicAppWorkflowState? FlowState { get; set; } + public LogicAppWorkflowState? FlowState { get; } /// Gets or sets workflow health. [WirePath("health")] - public LogicAppWorkflowHealth Health { get; set; } + public LogicAppWorkflowHealth Health { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.Serialization.cs index b977b0d9fb2c..2113f68effe9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.Serialization.cs @@ -40,7 +40,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Error)) { writer.WritePropertyName("error"u8); - writer.WriteObjectValue(Error, options); + ((IJsonModel)Error).Write(writer, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -80,7 +80,7 @@ internal static LogicAppWorkflowHealth DeserializeLogicAppWorkflowHealth(JsonEle return null; } LogicAppWorkflowHealthState state = default; - WorkflowErrorEntity error = default; + ResponseError error = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -96,7 +96,7 @@ internal static LogicAppWorkflowHealth DeserializeLogicAppWorkflowHealth(JsonEle { continue; } - error = WorkflowErrorEntity.DeserializeWorkflowErrorEntity(property.Value, options); + error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerAppContainersContext.Default); continue; } if (options.Format != "W") diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.cs index e6a7f44410de..57019dd60d8c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowHealth.cs @@ -47,7 +47,7 @@ public partial class LogicAppWorkflowHealth /// Initializes a new instance of . /// Gets or sets the workflow health state. - public LogicAppWorkflowHealth(LogicAppWorkflowHealthState state) + internal LogicAppWorkflowHealth(LogicAppWorkflowHealthState state) { State = state; } @@ -56,7 +56,7 @@ public LogicAppWorkflowHealth(LogicAppWorkflowHealthState state) /// Gets or sets the workflow health state. /// Gets or sets the workflow error. /// Keeps track of any properties unknown to the library. - internal LogicAppWorkflowHealth(LogicAppWorkflowHealthState state, WorkflowErrorEntity error, IDictionary serializedAdditionalRawData) + internal LogicAppWorkflowHealth(LogicAppWorkflowHealthState state, ResponseError error, IDictionary serializedAdditionalRawData) { State = state; Error = error; @@ -70,9 +70,9 @@ internal LogicAppWorkflowHealth() /// Gets or sets the workflow health state. [WirePath("state")] - public LogicAppWorkflowHealthState State { get; set; } + public LogicAppWorkflowHealthState State { get; } /// Gets or sets the workflow error. [WirePath("error")] - public WorkflowErrorEntity Error { get; set; } + public ResponseError Error { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowKind.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowKind.cs deleted file mode 100644 index f0a9edad8500..000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppWorkflowKind.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.AppContainers.Models -{ - /// Gets the logic app hybrid workflow kind. - public readonly partial struct LogicAppWorkflowKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LogicAppWorkflowKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StatefulValue = "Stateful"; - private const string StatelessValue = "Stateless"; - private const string AgenticValue = "Agentic"; - - /// Stateful. - public static LogicAppWorkflowKind Stateful { get; } = new LogicAppWorkflowKind(StatefulValue); - /// Stateless. - public static LogicAppWorkflowKind Stateless { get; } = new LogicAppWorkflowKind(StatelessValue); - /// Agentic. - public static LogicAppWorkflowKind Agentic { get; } = new LogicAppWorkflowKind(AgenticValue); - /// Determines if two values are the same. - public static bool operator ==(LogicAppWorkflowKind left, LogicAppWorkflowKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LogicAppWorkflowKind left, LogicAppWorkflowKind right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator LogicAppWorkflowKind(string value) => new LogicAppWorkflowKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LogicAppWorkflowKind other && Equals(other); - /// - public bool Equals(LogicAppWorkflowKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppsProxyMethod.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppsProxyMethod.cs new file mode 100644 index 000000000000..d769c7ca5114 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogicAppsProxyMethod.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The LogicAppsProxyMethod. + public readonly partial struct LogicAppsProxyMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LogicAppsProxyMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GETValue = "GET"; + private const string PostValue = "POST"; + + /// GET. + public static LogicAppsProxyMethod GET { get; } = new LogicAppsProxyMethod(GETValue); + /// POST. + public static LogicAppsProxyMethod Post { get; } = new LogicAppsProxyMethod(PostValue); + /// Determines if two values are the same. + public static bool operator ==(LogicAppsProxyMethod left, LogicAppsProxyMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LogicAppsProxyMethod left, LogicAppsProxyMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LogicAppsProxyMethod(string value) => new LogicAppsProxyMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LogicAppsProxyMethod other && Equals(other); + /// + public bool Equals(LogicAppsProxyMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogsConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogsConfiguration.Serialization.cs new file mode 100644 index 000000000000..9257d6b41b2f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogsConfiguration.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class LogsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LogsConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Destinations)) + { + writer.WritePropertyName("destinations"u8); + writer.WriteStartArray(); + foreach (var item in Destinations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LogsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LogsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLogsConfiguration(document.RootElement, options); + } + + internal static LogsConfiguration DeserializeLogsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList destinations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destinations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + destinations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LogsConfiguration(destinations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Destinations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" destinations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Destinations)) + { + if (Destinations.Any()) + { + builder.Append(" destinations: "); + builder.AppendLine("["); + foreach (var item in Destinations) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(LogsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + LogsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLogsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LogsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogsConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogsConfiguration.cs new file mode 100644 index 000000000000..56d361d4c576 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/LogsConfiguration.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of Open Telemetry logs. + internal partial class LogsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LogsConfiguration() + { + Destinations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Open telemetry logs destinations. + /// Keeps track of any properties unknown to the library. + internal LogsConfiguration(IList destinations, IDictionary serializedAdditionalRawData) + { + Destinations = destinations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Open telemetry logs destinations. + [WirePath("destinations")] + public IList Destinations { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.Serialization.cs index c1a1e58ce398..fb5f520fd528 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.Serialization.cs @@ -40,6 +40,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workloadProfileName"u8); writer.WriteStringValue(WorkloadProfileName); } + if (Optional.IsDefined(Scale)) + { + writer.WritePropertyName("scale"u8); + writer.WriteObjectValue(Scale, options); + } if (Optional.IsDefined(TerminationGracePeriodSeconds)) { writer.WritePropertyName("terminationGracePeriodSeconds"u8); @@ -93,6 +98,7 @@ internal static ManagedEnvironmentIngressConfiguration DeserializeManagedEnviron return null; } string workloadProfileName = default; + IngressConfigurationScale scale = default; int? terminationGracePeriodSeconds = default; int? headerCountLimit = default; int? requestIdleTimeout = default; @@ -105,6 +111,15 @@ internal static ManagedEnvironmentIngressConfiguration DeserializeManagedEnviron workloadProfileName = property.Value.GetString(); continue; } + if (property.NameEquals("scale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scale = IngressConfigurationScale.DeserializeIngressConfigurationScale(property.Value, options); + continue; + } if (property.NameEquals("terminationGracePeriodSeconds"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -138,7 +153,13 @@ internal static ManagedEnvironmentIngressConfiguration DeserializeManagedEnviron } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedEnvironmentIngressConfiguration(workloadProfileName, terminationGracePeriodSeconds, headerCountLimit, requestIdleTimeout, serializedAdditionalRawData); + return new ManagedEnvironmentIngressConfiguration( + workloadProfileName, + scale, + terminationGracePeriodSeconds, + headerCountLimit, + requestIdleTimeout, + serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -175,6 +196,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scale), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scale: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scale)) + { + builder.Append(" scale: "); + BicepSerializationHelpers.AppendChildObject(builder, Scale, options, 2, false, " scale: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TerminationGracePeriodSeconds), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.cs index 59f6e21ddabd..0bb9e9bea845 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentIngressConfiguration.cs @@ -52,13 +52,15 @@ public ManagedEnvironmentIngressConfiguration() /// Initializes a new instance of . /// Name of the workload profile used by the ingress component. Required. + /// Scaling configuration for the ingress component. Required. /// Time (in seconds) to allow active connections to complete on termination. Must be between 0 and 3600. Defaults to 480 seconds. /// Maximum number of headers per request allowed by the ingress. Must be at least 1. Defaults to 100. - /// Duration (in minutes) before idle requests are timed out. Must be between 4 and 30 inclusive. Defaults to 4 minutes. + /// Duration (in minutes) before idle requests are timed out. Must be at least 1 minute. Defaults to 4 minutes. /// Keeps track of any properties unknown to the library. - internal ManagedEnvironmentIngressConfiguration(string workloadProfileName, int? terminationGracePeriodSeconds, int? headerCountLimit, int? requestIdleTimeout, IDictionary serializedAdditionalRawData) + internal ManagedEnvironmentIngressConfiguration(string workloadProfileName, IngressConfigurationScale scale, int? terminationGracePeriodSeconds, int? headerCountLimit, int? requestIdleTimeout, IDictionary serializedAdditionalRawData) { WorkloadProfileName = workloadProfileName; + Scale = scale; TerminationGracePeriodSeconds = terminationGracePeriodSeconds; HeaderCountLimit = headerCountLimit; RequestIdleTimeout = requestIdleTimeout; @@ -68,13 +70,16 @@ internal ManagedEnvironmentIngressConfiguration(string workloadProfileName, int? /// Name of the workload profile used by the ingress component. Required. [WirePath("workloadProfileName")] public string WorkloadProfileName { get; set; } + /// Scaling configuration for the ingress component. Required. + [WirePath("scale")] + public IngressConfigurationScale Scale { get; set; } /// Time (in seconds) to allow active connections to complete on termination. Must be between 0 and 3600. Defaults to 480 seconds. [WirePath("terminationGracePeriodSeconds")] public int? TerminationGracePeriodSeconds { get; set; } /// Maximum number of headers per request allowed by the ingress. Must be at least 1. Defaults to 100. [WirePath("headerCountLimit")] public int? HeaderCountLimit { get; set; } - /// Duration (in minutes) before idle requests are timed out. Must be between 4 and 30 inclusive. Defaults to 4 minutes. + /// Duration (in minutes) before idle requests are timed out. Must be at least 1 minute. Defaults to 4 minutes. [WirePath("requestIdleTimeout")] public int? RequestIdleTimeout { get; set; } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.Serialization.cs index b086ecfcff27..d3d18604aa85 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.Serialization.cs @@ -111,7 +111,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsEnabled", out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsPeerToPeerEncryptionEnabled", out propertyOverride); if (hasPropertyOverride) { builder.Append(" encryption: "); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.cs index d8e48f3dfb09..d7e15492b243 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.cs @@ -63,14 +63,14 @@ internal ManagedEnvironmentPropertiesPeerTrafficConfiguration(ManagedEnvironment internal ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption Encryption { get; set; } /// Boolean indicating whether the peer traffic encryption is enabled. [WirePath("encryption.enabled")] - public bool? IsEnabled + public bool? IsPeerToPeerEncryptionEnabled { - get => Encryption is null ? default : Encryption.IsEnabled; + get => Encryption is null ? default : Encryption.IsPeerToPeerEncryptionEnabled; set { if (Encryption is null) Encryption = new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(); - Encryption.IsEnabled = value; + Encryption.IsPeerToPeerEncryptionEnabled = value; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.Serialization.cs index 7e5cdc87f354..5897f343795a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.Serialization.cs @@ -35,10 +35,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) + if (Optional.IsDefined(IsPeerToPeerEncryptionEnabled)) { writer.WritePropertyName("enabled"u8); - writer.WriteBooleanValue(IsEnabled.Value); + writer.WriteBooleanValue(IsPeerToPeerEncryptionEnabled.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -111,7 +111,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsEnabled), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsPeerToPeerEncryptionEnabled), out propertyOverride); if (hasPropertyOverride) { builder.Append(" enabled: "); @@ -119,10 +119,10 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(IsEnabled)) + if (Optional.IsDefined(IsPeerToPeerEncryptionEnabled)) { builder.Append(" enabled: "); - var boolValue = IsEnabled.Value == true ? "true" : "false"; + var boolValue = IsPeerToPeerEncryptionEnabled.Value == true ? "true" : "false"; builder.AppendLine($"{boolValue}"); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.cs index 2a23e0e72290..210f1a24ef89 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.cs @@ -51,16 +51,16 @@ public ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption() } /// Initializes a new instance of . - /// Boolean indicating whether the peer traffic encryption is enabled. + /// Boolean indicating whether the peer traffic encryption is enabled. /// Keeps track of any properties unknown to the library. - internal ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(bool? isEnabled, IDictionary serializedAdditionalRawData) + internal ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(bool? isPeerToPeerEncryptionEnabled, IDictionary serializedAdditionalRawData) { - IsEnabled = isEnabled; + IsPeerToPeerEncryptionEnabled = isPeerToPeerEncryptionEnabled; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Boolean indicating whether the peer traffic encryption is enabled. [WirePath("enabled")] - public bool? IsEnabled { get; set; } + public bool? IsPeerToPeerEncryptionEnabled { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerCredential.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerCredential.Serialization.cs new file mode 100644 index 000000000000..7980aaf9964c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerCredential.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class McpServerCredential : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(McpServerCredential)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + McpServerCredential IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(McpServerCredential)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMcpServerCredential(document.RootElement, options); + } + + internal static McpServerCredential DeserializeMcpServerCredential(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apiKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new McpServerCredential(apiKey, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiKey)) + { + builder.Append(" apiKey: "); + if (ApiKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiKey}'''"); + } + else + { + builder.AppendLine($"'{ApiKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(McpServerCredential)} does not support writing '{options.Format}' format."); + } + } + + McpServerCredential IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMcpServerCredential(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(McpServerCredential)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerCredential.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerCredential.cs new file mode 100644 index 000000000000..e058628b99a1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerCredential.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The credentials used for the MCP server endpoint authentication. + public partial class McpServerCredential + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal McpServerCredential() + { + } + + /// Initializes a new instance of . + /// The API key for the MCP server. + /// Keeps track of any properties unknown to the library. + internal McpServerCredential(string apiKey, IDictionary serializedAdditionalRawData) + { + ApiKey = apiKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The API key for the MCP server. + [WirePath("apiKey")] + public string ApiKey { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerSettings.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerSettings.Serialization.cs new file mode 100644 index 000000000000..b1e6fa1eb3a7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerSettings.Serialization.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class McpServerSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(McpServerSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsMcpServerEnabled)) + { + writer.WritePropertyName("isMcpServerEnabled"u8); + writer.WriteBooleanValue(IsMcpServerEnabled.Value); + } + if (Optional.IsDefined(IsMcpServerApiKeyDisabled)) + { + writer.WritePropertyName("isMcpServerApiKeyDisabled"u8); + writer.WriteBooleanValue(IsMcpServerApiKeyDisabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(McpServerEndpoint)) + { + writer.WritePropertyName("mcpServerEndpoint"u8); + writer.WriteStringValue(McpServerEndpoint); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + McpServerSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(McpServerSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMcpServerSettings(document.RootElement, options); + } + + internal static McpServerSettings DeserializeMcpServerSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isMcpServerEnabled = default; + bool? isMcpServerApiKeyDisabled = default; + string mcpServerEndpoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isMcpServerEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMcpServerEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isMcpServerApiKeyDisabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMcpServerApiKeyDisabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("mcpServerEndpoint"u8)) + { + mcpServerEndpoint = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new McpServerSettings(isMcpServerEnabled, isMcpServerApiKeyDisabled, mcpServerEndpoint, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsMcpServerEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isMcpServerEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsMcpServerEnabled)) + { + builder.Append(" isMcpServerEnabled: "); + var boolValue = IsMcpServerEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsMcpServerApiKeyDisabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isMcpServerApiKeyDisabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsMcpServerApiKeyDisabled)) + { + builder.Append(" isMcpServerApiKeyDisabled: "); + var boolValue = IsMcpServerApiKeyDisabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(McpServerEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mcpServerEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(McpServerEndpoint)) + { + builder.Append(" mcpServerEndpoint: "); + if (McpServerEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{McpServerEndpoint}'''"); + } + else + { + builder.AppendLine($"'{McpServerEndpoint}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(McpServerSettings)} does not support writing '{options.Format}' format."); + } + } + + McpServerSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMcpServerSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(McpServerSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerSettings.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerSettings.cs new file mode 100644 index 000000000000..71c882f09de3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/McpServerSettings.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The settings of the MCP server for this session pool. + public partial class McpServerSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public McpServerSettings() + { + } + + /// Initializes a new instance of . + /// Indicates whether the MCP server is enabled. + /// Indicates whether the MCP server API key is disabled. + /// The endpoint of the MCP server. + /// Keeps track of any properties unknown to the library. + internal McpServerSettings(bool? isMcpServerEnabled, bool? isMcpServerApiKeyDisabled, string mcpServerEndpoint, IDictionary serializedAdditionalRawData) + { + IsMcpServerEnabled = isMcpServerEnabled; + IsMcpServerApiKeyDisabled = isMcpServerApiKeyDisabled; + McpServerEndpoint = mcpServerEndpoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether the MCP server is enabled. + [WirePath("isMcpServerEnabled")] + public bool? IsMcpServerEnabled { get; set; } + /// Indicates whether the MCP server API key is disabled. + [WirePath("isMcpServerApiKeyDisabled")] + public bool? IsMcpServerApiKeyDisabled { get; set; } + /// The endpoint of the MCP server. + [WirePath("mcpServerEndpoint")] + public string McpServerEndpoint { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/MetricsConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/MetricsConfiguration.Serialization.cs new file mode 100644 index 000000000000..c975a2a73cad --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/MetricsConfiguration.Serialization.cs @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class MetricsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MetricsConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IncludeKeda)) + { + writer.WritePropertyName("includeKeda"u8); + writer.WriteBooleanValue(IncludeKeda.Value); + } + if (Optional.IsCollectionDefined(Destinations)) + { + writer.WritePropertyName("destinations"u8); + writer.WriteStartArray(); + foreach (var item in Destinations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MetricsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MetricsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMetricsConfiguration(document.RootElement, options); + } + + internal static MetricsConfiguration DeserializeMetricsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? includeKeda = default; + IList destinations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("includeKeda"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + includeKeda = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("destinations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + destinations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MetricsConfiguration(includeKeda, destinations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IncludeKeda), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" includeKeda: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IncludeKeda)) + { + builder.Append(" includeKeda: "); + var boolValue = IncludeKeda.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Destinations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" destinations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Destinations)) + { + if (Destinations.Any()) + { + builder.Append(" destinations: "); + builder.AppendLine("["); + foreach (var item in Destinations) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(MetricsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + MetricsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMetricsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MetricsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/MetricsConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/MetricsConfiguration.cs new file mode 100644 index 000000000000..f81d8fb7555d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/MetricsConfiguration.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of Open Telemetry metrics. + public partial class MetricsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MetricsConfiguration() + { + Destinations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Boolean indicating if including keda metrics. + /// Open telemetry metrics destinations. + /// Keeps track of any properties unknown to the library. + internal MetricsConfiguration(bool? includeKeda, IList destinations, IDictionary serializedAdditionalRawData) + { + IncludeKeda = includeKeda; + Destinations = destinations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Boolean indicating if including keda metrics. + [WirePath("includeKeda")] + public bool? IncludeKeda { get; set; } + /// Open telemetry metrics destinations. + [WirePath("destinations")] + public IList Destinations { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/NacosComponent.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/NacosComponent.Serialization.cs new file mode 100644 index 000000000000..07b6b64170bc --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/NacosComponent.Serialization.cs @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class NacosComponent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NacosComponent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Ingress)) + { + writer.WritePropertyName("ingress"u8); + writer.WriteObjectValue(Ingress, options); + } + } + + NacosComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NacosComponent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNacosComponent(document.RootElement, options); + } + + internal static NacosComponent DeserializeNacosComponent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + JavaComponentIngress ingress = default; + JavaComponentType componentType = default; + JavaComponentProvisioningState? provisioningState = default; + IList configurations = default; + JavaComponentPropertiesScale scale = default; + IList serviceBinds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ingress"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ingress = JavaComponentIngress.DeserializeJavaComponentIngress(property.Value, options); + continue; + } + if (property.NameEquals("componentType"u8)) + { + componentType = new JavaComponentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new JavaComponentProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("configurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JavaComponentConfigurationProperty.DeserializeJavaComponentConfigurationProperty(item, options)); + } + configurations = array; + continue; + } + if (property.NameEquals("scale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scale = JavaComponentPropertiesScale.DeserializeJavaComponentPropertiesScale(property.Value, options); + continue; + } + if (property.NameEquals("serviceBinds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JavaComponentServiceBind.DeserializeJavaComponentServiceBind(item, options)); + } + serviceBinds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NacosComponent( + componentType, + provisioningState, + configurations ?? new ChangeTrackingList(), + scale, + serviceBinds ?? new ChangeTrackingList(), + serializedAdditionalRawData, + ingress); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IngressFqdn", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ingress: "); + builder.AppendLine("{"); + builder.Append(" fqdn: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Ingress)) + { + builder.Append(" ingress: "); + BicepSerializationHelpers.AppendChildObject(builder, Ingress, options, 2, false, " ingress: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComponentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" componentType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" componentType: "); + builder.AppendLine($"'{ComponentType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Configurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Configurations)) + { + if (Configurations.Any()) + { + builder.Append(" configurations: "); + builder.AppendLine("["); + foreach (var item in Configurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " configurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scale), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scale: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scale)) + { + builder.Append(" scale: "); + BicepSerializationHelpers.AppendChildObject(builder, Scale, options, 2, false, " scale: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceBinds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceBinds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServiceBinds)) + { + if (ServiceBinds.Any()) + { + builder.Append(" serviceBinds: "); + builder.AppendLine("["); + foreach (var item in ServiceBinds) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " serviceBinds: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NacosComponent)} does not support writing '{options.Format}' format."); + } + } + + NacosComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNacosComponent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NacosComponent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/NacosComponent.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/NacosComponent.cs new file mode 100644 index 000000000000..2984ccafcde3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/NacosComponent.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Nacos properties. + public partial class NacosComponent : JavaComponentProperties + { + /// Initializes a new instance of . + public NacosComponent() + { + ComponentType = JavaComponentType.Nacos; + } + + /// Initializes a new instance of . + /// Type of the Java Component. + /// Provisioning state of the Java Component. + /// List of Java Components configuration properties. + /// Java component scaling configurations. + /// List of Java Components that are bound to the Java component. + /// Keeps track of any properties unknown to the library. + /// Java Component Ingress configurations. + internal NacosComponent(JavaComponentType componentType, JavaComponentProvisioningState? provisioningState, IList configurations, JavaComponentPropertiesScale scale, IList serviceBinds, IDictionary serializedAdditionalRawData, JavaComponentIngress ingress) : base(componentType, provisioningState, configurations, scale, serviceBinds, serializedAdditionalRawData) + { + Ingress = ingress; + ComponentType = componentType; + } + + /// Java Component Ingress configurations. + internal JavaComponentIngress Ingress { get; set; } + /// Hostname of the Java Component endpoint. + [WirePath("ingress.fqdn")] + public string IngressFqdn + { + get => Ingress is null ? default : Ingress.Fqdn; + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OpenTelemetryConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OpenTelemetryConfiguration.Serialization.cs new file mode 100644 index 000000000000..0a71adf9ce60 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OpenTelemetryConfiguration.Serialization.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class OpenTelemetryConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenTelemetryConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DestinationsConfiguration)) + { + writer.WritePropertyName("destinationsConfiguration"u8); + writer.WriteObjectValue(DestinationsConfiguration, options); + } + if (Optional.IsDefined(TracesConfiguration)) + { + writer.WritePropertyName("tracesConfiguration"u8); + writer.WriteObjectValue(TracesConfiguration, options); + } + if (Optional.IsDefined(LogsConfiguration)) + { + writer.WritePropertyName("logsConfiguration"u8); + writer.WriteObjectValue(LogsConfiguration, options); + } + if (Optional.IsDefined(MetricsConfiguration)) + { + writer.WritePropertyName("metricsConfiguration"u8); + writer.WriteObjectValue(MetricsConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OpenTelemetryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenTelemetryConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenTelemetryConfiguration(document.RootElement, options); + } + + internal static OpenTelemetryConfiguration DeserializeOpenTelemetryConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DestinationsConfiguration destinationsConfiguration = default; + TracesConfiguration tracesConfiguration = default; + LogsConfiguration logsConfiguration = default; + MetricsConfiguration metricsConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destinationsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationsConfiguration = DestinationsConfiguration.DeserializeDestinationsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("tracesConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tracesConfiguration = TracesConfiguration.DeserializeTracesConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("logsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logsConfiguration = LogsConfiguration.DeserializeLogsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("metricsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metricsConfiguration = MetricsConfiguration.DeserializeMetricsConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenTelemetryConfiguration(destinationsConfiguration, tracesConfiguration, logsConfiguration, metricsConfiguration, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DestinationsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" destinationsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DestinationsConfiguration)) + { + builder.Append(" destinationsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, DestinationsConfiguration, options, 2, false, " destinationsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TracesConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tracesConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TracesConfiguration)) + { + builder.Append(" tracesConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, TracesConfiguration, options, 2, false, " tracesConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("LogsDestinations", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logsConfiguration: "); + builder.AppendLine("{"); + builder.Append(" destinations: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(LogsConfiguration)) + { + builder.Append(" logsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, LogsConfiguration, options, 2, false, " logsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MetricsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metricsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MetricsConfiguration)) + { + builder.Append(" metricsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, MetricsConfiguration, options, 2, false, " metricsConfiguration: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OpenTelemetryConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OpenTelemetryConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOpenTelemetryConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenTelemetryConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OpenTelemetryConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OpenTelemetryConfiguration.cs new file mode 100644 index 000000000000..4ef632e1cdca --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OpenTelemetryConfiguration.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of Open Telemetry. + public partial class OpenTelemetryConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenTelemetryConfiguration() + { + } + + /// Initializes a new instance of . + /// Open telemetry destinations configuration. + /// Open telemetry trace configuration. + /// Open telemetry logs configuration. + /// Open telemetry metrics configuration. + /// Keeps track of any properties unknown to the library. + internal OpenTelemetryConfiguration(DestinationsConfiguration destinationsConfiguration, TracesConfiguration tracesConfiguration, LogsConfiguration logsConfiguration, MetricsConfiguration metricsConfiguration, IDictionary serializedAdditionalRawData) + { + DestinationsConfiguration = destinationsConfiguration; + TracesConfiguration = tracesConfiguration; + LogsConfiguration = logsConfiguration; + MetricsConfiguration = metricsConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Open telemetry destinations configuration. + [WirePath("destinationsConfiguration")] + public DestinationsConfiguration DestinationsConfiguration { get; set; } + /// Open telemetry trace configuration. + [WirePath("tracesConfiguration")] + public TracesConfiguration TracesConfiguration { get; set; } + /// Open telemetry logs configuration. + internal LogsConfiguration LogsConfiguration { get; set; } + /// Open telemetry logs destinations. + [WirePath("logsConfiguration.destinations")] + public IList LogsDestinations + { + get + { + if (LogsConfiguration is null) + LogsConfiguration = new LogsConfiguration(); + return LogsConfiguration.Destinations; + } + } + + /// Open telemetry metrics configuration. + [WirePath("metricsConfiguration")] + public MetricsConfiguration MetricsConfiguration { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OtlpConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OtlpConfiguration.Serialization.cs new file mode 100644 index 000000000000..f5dc74df6d92 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OtlpConfiguration.Serialization.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class OtlpConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OtlpConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); + } + if (Optional.IsDefined(Insecure)) + { + writer.WritePropertyName("insecure"u8); + writer.WriteBooleanValue(Insecure.Value); + } + if (Optional.IsCollectionDefined(Headers)) + { + writer.WritePropertyName("headers"u8); + writer.WriteStartArray(); + foreach (var item in Headers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OtlpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OtlpConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOtlpConfiguration(document.RootElement, options); + } + + internal static OtlpConfiguration DeserializeOtlpConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string endpoint = default; + bool? insecure = default; + IList
headers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoint"u8)) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("insecure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + insecure = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("headers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List
array = new List
(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Header.DeserializeHeader(item, options)); + } + headers = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OtlpConfiguration(name, endpoint, insecure, headers ?? new ChangeTrackingList
(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Endpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Endpoint)) + { + builder.Append(" endpoint: "); + if (Endpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Endpoint}'''"); + } + else + { + builder.AppendLine($"'{Endpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Insecure), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" insecure: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Insecure)) + { + builder.Append(" insecure: "); + var boolValue = Insecure.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " headers: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OtlpConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OtlpConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOtlpConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OtlpConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OtlpConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OtlpConfiguration.cs new file mode 100644 index 000000000000..f1014d81d0e1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/OtlpConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of otlp. + public partial class OtlpConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OtlpConfiguration() + { + Headers = new ChangeTrackingList
(); + } + + /// Initializes a new instance of . + /// The name of otlp configuration. + /// The endpoint of otlp configuration. + /// Boolean indicating if otlp configuration is insecure. + /// Headers of otlp configurations. + /// Keeps track of any properties unknown to the library. + internal OtlpConfiguration(string name, string endpoint, bool? insecure, IList
headers, IDictionary serializedAdditionalRawData) + { + Name = name; + Endpoint = endpoint; + Insecure = insecure; + Headers = headers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of otlp configuration. + [WirePath("name")] + public string Name { get; set; } + /// The endpoint of otlp configuration. + [WirePath("endpoint")] + public string Endpoint { get; set; } + /// Boolean indicating if otlp configuration is insecure. + [WirePath("insecure")] + public bool? Insecure { get; set; } + /// Headers of otlp configurations. + [WirePath("headers")] + public IList
Headers { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchApplyStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchApplyStatus.cs new file mode 100644 index 000000000000..2012f2a8c393 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchApplyStatus.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The status of the patch once it has been provisioned. + public readonly partial struct PatchApplyStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PatchApplyStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string RebaseInProgressValue = "RebaseInProgress"; + private const string CreatingRevisionValue = "CreatingRevision"; + private const string SucceededValue = "Succeeded"; + private const string CanceledValue = "Canceled"; + private const string RebaseFailedValue = "RebaseFailed"; + private const string RevisionCreationFailedValue = "RevisionCreationFailed"; + private const string ImagePushPullFailedValue = "ImagePushPullFailed"; + private const string ManuallySkippedValue = "ManuallySkipped"; + + /// NotStarted. + public static PatchApplyStatus NotStarted { get; } = new PatchApplyStatus(NotStartedValue); + /// RebaseInProgress. + public static PatchApplyStatus RebaseInProgress { get; } = new PatchApplyStatus(RebaseInProgressValue); + /// CreatingRevision. + public static PatchApplyStatus CreatingRevision { get; } = new PatchApplyStatus(CreatingRevisionValue); + /// Succeeded. + public static PatchApplyStatus Succeeded { get; } = new PatchApplyStatus(SucceededValue); + /// Canceled. + public static PatchApplyStatus Canceled { get; } = new PatchApplyStatus(CanceledValue); + /// RebaseFailed. + public static PatchApplyStatus RebaseFailed { get; } = new PatchApplyStatus(RebaseFailedValue); + /// RevisionCreationFailed. + public static PatchApplyStatus RevisionCreationFailed { get; } = new PatchApplyStatus(RevisionCreationFailedValue); + /// ImagePushPullFailed. + public static PatchApplyStatus ImagePushPullFailed { get; } = new PatchApplyStatus(ImagePushPullFailedValue); + /// ManuallySkipped. + public static PatchApplyStatus ManuallySkipped { get; } = new PatchApplyStatus(ManuallySkippedValue); + /// Determines if two values are the same. + public static bool operator ==(PatchApplyStatus left, PatchApplyStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PatchApplyStatus left, PatchApplyStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PatchApplyStatus(string value) => new PatchApplyStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PatchApplyStatus other && Equals(other); + /// + public bool Equals(PatchApplyStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchCollection.Serialization.cs new file mode 100644 index 000000000000..b8c1baed4d6c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchCollection.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class PatchCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchCollection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchCollection(document.RootElement, options); + } + + internal static PatchCollection DeserializePatchCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerAppsPatchResourceData.DeserializeContainerAppsPatchResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PatchCollection)} does not support writing '{options.Format}' format."); + } + } + + PatchCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchCollection.cs new file mode 100644 index 000000000000..7f0b3c7b325c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container App patch collection. + internal partial class PatchCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of patch resources. + /// is null. + internal PatchCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of patch resources. + /// the link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal PatchCollection(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PatchCollection() + { + } + + /// Collection of patch resources. + public IReadOnlyList Value { get; } + /// the link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetails.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetails.Serialization.cs new file mode 100644 index 000000000000..478a76c97beb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetails.Serialization.cs @@ -0,0 +1,384 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class PatchDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("targetContainerName"u8); + writer.WriteStringValue(TargetContainerName); + } + if (options.Format != "W") + { + writer.WritePropertyName("targetImage"u8); + writer.WriteStringValue(TargetImage); + } + if (options.Format != "W") + { + writer.WritePropertyName("lastDetectionTime"u8); + writer.WriteStringValue(LastDetectionOn, "O"); + } + if (options.Format != "W") + { + writer.WritePropertyName("detectionStatus"u8); + writer.WriteStringValue(DetectionStatus.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(NewImageName)) + { + writer.WritePropertyName("newImageName"u8); + writer.WriteStringValue(NewImageName); + } + if (options.Format != "W" && Optional.IsDefined(NewLayer)) + { + writer.WritePropertyName("newLayer"u8); + writer.WriteObjectValue(NewLayer, options); + } + if (options.Format != "W" && Optional.IsDefined(OldLayer)) + { + writer.WritePropertyName("oldLayer"u8); + writer.WriteObjectValue(OldLayer, options); + } + if (options.Format != "W" && Optional.IsDefined(PatchType)) + { + writer.WritePropertyName("patchType"u8); + writer.WriteStringValue(PatchType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchDetails(document.RootElement, options); + } + + internal static PatchDetails DeserializePatchDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string targetContainerName = default; + string targetImage = default; + DateTimeOffset lastDetectionTime = default; + DetectionStatus detectionStatus = default; + string newImageName = default; + PatchDetailsNewLayer newLayer = default; + PatchDetailsOldLayer oldLayer = default; + PatchType? patchType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetContainerName"u8)) + { + targetContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetImage"u8)) + { + targetImage = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastDetectionTime"u8)) + { + lastDetectionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("detectionStatus"u8)) + { + detectionStatus = new DetectionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("newImageName"u8)) + { + newImageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("newLayer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + newLayer = PatchDetailsNewLayer.DeserializePatchDetailsNewLayer(property.Value, options); + continue; + } + if (property.NameEquals("oldLayer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + oldLayer = PatchDetailsOldLayer.DeserializePatchDetailsOldLayer(property.Value, options); + continue; + } + if (property.NameEquals("patchType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchType = new PatchType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchDetails( + targetContainerName, + targetImage, + lastDetectionTime, + detectionStatus, + newImageName, + newLayer, + oldLayer, + patchType, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetContainerName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetContainerName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetContainerName)) + { + builder.Append(" targetContainerName: "); + if (TargetContainerName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetContainerName}'''"); + } + else + { + builder.AppendLine($"'{TargetContainerName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetImage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetImage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetImage)) + { + builder.Append(" targetImage: "); + if (TargetImage.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetImage}'''"); + } + else + { + builder.AppendLine($"'{TargetImage}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastDetectionOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastDetectionTime: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" lastDetectionTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastDetectionOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DetectionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" detectionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" detectionStatus: "); + builder.AppendLine($"'{DetectionStatus.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NewImageName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" newImageName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NewImageName)) + { + builder.Append(" newImageName: "); + if (NewImageName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NewImageName}'''"); + } + else + { + builder.AppendLine($"'{NewImageName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NewLayer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" newLayer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NewLayer)) + { + builder.Append(" newLayer: "); + BicepSerializationHelpers.AppendChildObject(builder, NewLayer, options, 2, false, " newLayer: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OldLayer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oldLayer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OldLayer)) + { + builder.Append(" oldLayer: "); + BicepSerializationHelpers.AppendChildObject(builder, OldLayer, options, 2, false, " oldLayer: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchType)) + { + builder.Append(" patchType: "); + builder.AppendLine($"'{PatchType.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PatchDetails)} does not support writing '{options.Format}' format."); + } + } + + PatchDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetails.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetails.cs new file mode 100644 index 000000000000..bee7c1020cac --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetails.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The detailed info of patch operation performing when applying a patch. + public partial class PatchDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the target container for the patch. + /// The name of the target image for the patch. + /// The UTC timestamp that describes the latest detection was done. + /// The status of the patch detection. + internal PatchDetails(string targetContainerName, string targetImage, DateTimeOffset lastDetectionOn, DetectionStatus detectionStatus) + { + TargetContainerName = targetContainerName; + TargetImage = targetImage; + LastDetectionOn = lastDetectionOn; + DetectionStatus = detectionStatus; + } + + /// Initializes a new instance of . + /// The name of the target container for the patch. + /// The name of the target image for the patch. + /// The UTC timestamp that describes the latest detection was done. + /// The status of the patch detection. + /// The name of the new image created by the patch. + /// New layer update details in the target image. + /// The old layer details in the target image. + /// The type for the patch. + /// Keeps track of any properties unknown to the library. + internal PatchDetails(string targetContainerName, string targetImage, DateTimeOffset lastDetectionOn, DetectionStatus detectionStatus, string newImageName, PatchDetailsNewLayer newLayer, PatchDetailsOldLayer oldLayer, PatchType? patchType, IDictionary serializedAdditionalRawData) + { + TargetContainerName = targetContainerName; + TargetImage = targetImage; + LastDetectionOn = lastDetectionOn; + DetectionStatus = detectionStatus; + NewImageName = newImageName; + NewLayer = newLayer; + OldLayer = oldLayer; + PatchType = patchType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PatchDetails() + { + } + + /// The name of the target container for the patch. + [WirePath("targetContainerName")] + public string TargetContainerName { get; } + /// The name of the target image for the patch. + [WirePath("targetImage")] + public string TargetImage { get; } + /// The UTC timestamp that describes the latest detection was done. + [WirePath("lastDetectionTime")] + public DateTimeOffset LastDetectionOn { get; } + /// The status of the patch detection. + [WirePath("detectionStatus")] + public DetectionStatus DetectionStatus { get; } + /// The name of the new image created by the patch. + [WirePath("newImageName")] + public string NewImageName { get; } + /// New layer update details in the target image. + [WirePath("newLayer")] + public PatchDetailsNewLayer NewLayer { get; } + /// The old layer details in the target image. + [WirePath("oldLayer")] + public PatchDetailsOldLayer OldLayer { get; } + /// The type for the patch. + [WirePath("patchType")] + public PatchType? PatchType { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsNewLayer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsNewLayer.Serialization.cs new file mode 100644 index 000000000000..fd8c0cf354b1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsNewLayer.Serialization.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class PatchDetailsNewLayer : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchDetailsNewLayer)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(FrameworkAndVersion)) + { + writer.WritePropertyName("frameworkAndVersion"u8); + writer.WriteStringValue(FrameworkAndVersion); + } + if (Optional.IsDefined(OSAndVersion)) + { + writer.WritePropertyName("osAndVersion"u8); + writer.WriteStringValue(OSAndVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchDetailsNewLayer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchDetailsNewLayer)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchDetailsNewLayer(document.RootElement, options); + } + + internal static PatchDetailsNewLayer DeserializePatchDetailsNewLayer(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string frameworkAndVersion = default; + string osAndVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("frameworkAndVersion"u8)) + { + frameworkAndVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("osAndVersion"u8)) + { + osAndVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchDetailsNewLayer(name, frameworkAndVersion, osAndVersion, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FrameworkAndVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frameworkAndVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FrameworkAndVersion)) + { + builder.Append(" frameworkAndVersion: "); + if (FrameworkAndVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FrameworkAndVersion}'''"); + } + else + { + builder.AppendLine($"'{FrameworkAndVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSAndVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osAndVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSAndVersion)) + { + builder.Append(" osAndVersion: "); + if (OSAndVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OSAndVersion}'''"); + } + else + { + builder.AppendLine($"'{OSAndVersion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PatchDetailsNewLayer)} does not support writing '{options.Format}' format."); + } + } + + PatchDetailsNewLayer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchDetailsNewLayer(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchDetailsNewLayer)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsNewLayer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsNewLayer.cs new file mode 100644 index 000000000000..95a7569ce1b4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsNewLayer.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// New layer update details in the target image. + public partial class PatchDetailsNewLayer + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PatchDetailsNewLayer() + { + } + + /// Initializes a new instance of . + /// The details of the new layer for the target image. + /// The framework and its version in the new run image for the target image. + /// The OS name and its version in the new run image for the target image. + /// Keeps track of any properties unknown to the library. + internal PatchDetailsNewLayer(string name, string frameworkAndVersion, string osAndVersion, IDictionary serializedAdditionalRawData) + { + Name = name; + FrameworkAndVersion = frameworkAndVersion; + OSAndVersion = osAndVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The details of the new layer for the target image. + [WirePath("name")] + public string Name { get; } + /// The framework and its version in the new run image for the target image. + [WirePath("frameworkAndVersion")] + public string FrameworkAndVersion { get; } + /// The OS name and its version in the new run image for the target image. + [WirePath("osAndVersion")] + public string OSAndVersion { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsOldLayer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsOldLayer.Serialization.cs new file mode 100644 index 000000000000..abf39d15bfd3 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsOldLayer.Serialization.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class PatchDetailsOldLayer : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchDetailsOldLayer)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(FrameworkAndVersion)) + { + writer.WritePropertyName("frameworkAndVersion"u8); + writer.WriteStringValue(FrameworkAndVersion); + } + if (Optional.IsDefined(OSAndVersion)) + { + writer.WritePropertyName("osAndVersion"u8); + writer.WriteStringValue(OSAndVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchDetailsOldLayer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchDetailsOldLayer)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchDetailsOldLayer(document.RootElement, options); + } + + internal static PatchDetailsOldLayer DeserializePatchDetailsOldLayer(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string frameworkAndVersion = default; + string osAndVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("frameworkAndVersion"u8)) + { + frameworkAndVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("osAndVersion"u8)) + { + osAndVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchDetailsOldLayer(name, frameworkAndVersion, osAndVersion, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FrameworkAndVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frameworkAndVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FrameworkAndVersion)) + { + builder.Append(" frameworkAndVersion: "); + if (FrameworkAndVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FrameworkAndVersion}'''"); + } + else + { + builder.AppendLine($"'{FrameworkAndVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSAndVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osAndVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSAndVersion)) + { + builder.Append(" osAndVersion: "); + if (OSAndVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OSAndVersion}'''"); + } + else + { + builder.AppendLine($"'{OSAndVersion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PatchDetailsOldLayer)} does not support writing '{options.Format}' format."); + } + } + + PatchDetailsOldLayer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchDetailsOldLayer(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchDetailsOldLayer)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsOldLayer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsOldLayer.cs new file mode 100644 index 000000000000..87b9ba5f942c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchDetailsOldLayer.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The old layer details in the target image. + public partial class PatchDetailsOldLayer + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PatchDetailsOldLayer() + { + } + + /// Initializes a new instance of . + /// The details of the old layer for the target image. + /// The framework and its version in the old run image for the target image. + /// The OS name and its version in the old run image for the target image. + /// Keeps track of any properties unknown to the library. + internal PatchDetailsOldLayer(string name, string frameworkAndVersion, string osAndVersion, IDictionary serializedAdditionalRawData) + { + Name = name; + FrameworkAndVersion = frameworkAndVersion; + OSAndVersion = osAndVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The details of the old layer for the target image. + [WirePath("name")] + public string Name { get; } + /// The framework and its version in the old run image for the target image. + [WirePath("frameworkAndVersion")] + public string FrameworkAndVersion { get; } + /// The OS name and its version in the old run image for the target image. + [WirePath("osAndVersion")] + public string OSAndVersion { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchProperties.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchProperties.Serialization.cs new file mode 100644 index 000000000000..2d398a235f6d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchProperties.Serialization.cs @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class PatchProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TargetEnvironmentId)) + { + writer.WritePropertyName("targetEnvironmentId"u8); + writer.WriteStringValue(TargetEnvironmentId); + } + if (Optional.IsDefined(TargetContainerAppId)) + { + writer.WritePropertyName("targetContainerAppId"u8); + writer.WriteStringValue(TargetContainerAppId); + } + if (Optional.IsDefined(TargetRevisionId)) + { + writer.WritePropertyName("targetRevisionId"u8); + writer.WriteStringValue(TargetRevisionId); + } + if (options.Format != "W" && Optional.IsDefined(PatchApplyStatus)) + { + writer.WritePropertyName("patchApplyStatus"u8); + writer.WriteStringValue(PatchApplyStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastModifiedOn)) + { + writer.WritePropertyName("lastModifiedAt"u8); + writer.WriteStringValue(LastModifiedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsCollectionDefined(PatchDetails)) + { + writer.WritePropertyName("patchDetails"u8); + writer.WriteStartArray(); + foreach (var item in PatchDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchProperties(document.RootElement, options); + } + + internal static PatchProperties DeserializePatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier targetEnvironmentId = default; + ResourceIdentifier targetContainerAppId = default; + ResourceIdentifier targetRevisionId = default; + PatchApplyStatus? patchApplyStatus = default; + DateTimeOffset? createdAt = default; + DateTimeOffset? lastModifiedAt = default; + IReadOnlyList patchDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetEnvironmentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetEnvironmentId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetContainerAppId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetContainerAppId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetRevisionId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetRevisionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("patchApplyStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchApplyStatus = new PatchApplyStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastModifiedAt"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModifiedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("patchDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.PatchDetails.DeserializePatchDetails(item, options)); + } + patchDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchProperties( + targetEnvironmentId, + targetContainerAppId, + targetRevisionId, + patchApplyStatus, + createdAt, + lastModifiedAt, + patchDetails ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetEnvironmentId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetEnvironmentId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetEnvironmentId)) + { + builder.Append(" targetEnvironmentId: "); + builder.AppendLine($"'{TargetEnvironmentId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetContainerAppId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetContainerAppId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetContainerAppId)) + { + builder.Append(" targetContainerAppId: "); + builder.AppendLine($"'{TargetContainerAppId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetRevisionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetRevisionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetRevisionId)) + { + builder.Append(" targetRevisionId: "); + builder.AppendLine($"'{TargetRevisionId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchApplyStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchApplyStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchApplyStatus)) + { + builder.Append(" patchApplyStatus: "); + builder.AppendLine($"'{PatchApplyStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdAt: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdAt: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastModifiedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastModifiedAt: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastModifiedOn)) + { + builder.Append(" lastModifiedAt: "); + var formattedDateTimeString = TypeFormatters.ToString(LastModifiedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PatchDetails)) + { + if (PatchDetails.Any()) + { + builder.Append(" patchDetails: "); + builder.AppendLine("["); + foreach (var item in PatchDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " patchDetails: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PatchProperties)} does not support writing '{options.Format}' format."); + } + } + + PatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchProperties.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchProperties.cs new file mode 100644 index 000000000000..7850c127a850 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchProperties.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Top level properties that describes current states of the patch resource. + public partial class PatchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PatchProperties() + { + PatchDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The Azure resource id of the target environment for the patch. + /// The Azure resource id of the target container app for the patch. + /// The Azure resource id of the target revision for the patch. + /// The status of the patch operation. + /// The UTC timestamp that describes when the patch object was created. + /// The UTC timestamp that describes when the patch object was last updated. + /// Detailed info describes the patch operation for the target container app. + /// Keeps track of any properties unknown to the library. + internal PatchProperties(ResourceIdentifier targetEnvironmentId, ResourceIdentifier targetContainerAppId, ResourceIdentifier targetRevisionId, PatchApplyStatus? patchApplyStatus, DateTimeOffset? createdOn, DateTimeOffset? lastModifiedOn, IReadOnlyList patchDetails, IDictionary serializedAdditionalRawData) + { + TargetEnvironmentId = targetEnvironmentId; + TargetContainerAppId = targetContainerAppId; + TargetRevisionId = targetRevisionId; + PatchApplyStatus = patchApplyStatus; + CreatedOn = createdOn; + LastModifiedOn = lastModifiedOn; + PatchDetails = patchDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Azure resource id of the target environment for the patch. + [WirePath("targetEnvironmentId")] + public ResourceIdentifier TargetEnvironmentId { get; } + /// The Azure resource id of the target container app for the patch. + [WirePath("targetContainerAppId")] + public ResourceIdentifier TargetContainerAppId { get; } + /// The Azure resource id of the target revision for the patch. + [WirePath("targetRevisionId")] + public ResourceIdentifier TargetRevisionId { get; } + /// The status of the patch operation. + [WirePath("patchApplyStatus")] + public PatchApplyStatus? PatchApplyStatus { get; } + /// The UTC timestamp that describes when the patch object was created. + [WirePath("createdAt")] + public DateTimeOffset? CreatedOn { get; } + /// The UTC timestamp that describes when the patch object was last updated. + [WirePath("lastModifiedAt")] + public DateTimeOffset? LastModifiedOn { get; } + /// Detailed info describes the patch operation for the target container app. + [WirePath("patchDetails")] + public IReadOnlyList PatchDetails { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchSkipConfig.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchSkipConfig.Serialization.cs new file mode 100644 index 000000000000..de3f66287071 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchSkipConfig.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class PatchSkipConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchSkipConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Skip)) + { + writer.WritePropertyName("skip"u8); + writer.WriteBooleanValue(Skip.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchSkipConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchSkipConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchSkipConfig(document.RootElement, options); + } + + internal static PatchSkipConfig DeserializePatchSkipConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? skip = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("skip"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + skip = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchSkipConfig(skip, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + default: + throw new FormatException($"The model {nameof(PatchSkipConfig)} does not support writing '{options.Format}' format."); + } + } + + PatchSkipConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchSkipConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchSkipConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchSkipConfig.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchSkipConfig.cs new file mode 100644 index 000000000000..5af12fcd7dd5 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchSkipConfig.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The configuration for patcher to skip a patch or not. + public partial class PatchSkipConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PatchSkipConfig() + { + } + + /// Initializes a new instance of . + /// The flag to indicate whether to skip the patch or not. + /// Keeps track of any properties unknown to the library. + internal PatchSkipConfig(bool? skip, IDictionary serializedAdditionalRawData) + { + Skip = skip; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The flag to indicate whether to skip the patch or not. + [WirePath("skip")] + public bool? Skip { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchType.cs new file mode 100644 index 000000000000..93758a632abb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The type for the patch. + public readonly partial struct PatchType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PatchType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FrameworkSecurityValue = "FrameworkSecurity"; + private const string OSSecurityValue = "OSSecurity"; + private const string FrameworkAndOSSecurityValue = "FrameworkAndOSSecurity"; + private const string OtherValue = "Other"; + + /// FrameworkSecurity. + public static PatchType FrameworkSecurity { get; } = new PatchType(FrameworkSecurityValue); + /// OSSecurity. + public static PatchType OSSecurity { get; } = new PatchType(OSSecurityValue); + /// FrameworkAndOSSecurity. + public static PatchType FrameworkAndOSSecurity { get; } = new PatchType(FrameworkAndOSSecurityValue); + /// Other. + public static PatchType Other { get; } = new PatchType(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(PatchType left, PatchType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PatchType left, PatchType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PatchType(string value) => new PatchType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PatchType other && Equals(other); + /// + public bool Equals(PatchType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchingMode.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchingMode.cs new file mode 100644 index 000000000000..e57ada38ac69 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PatchingMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + public readonly partial struct PatchingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PatchingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string ManualValue = "Manual"; + private const string DisabledValue = "Disabled"; + + /// Automatic. + public static PatchingMode Automatic { get; } = new PatchingMode(AutomaticValue); + /// Manual. + public static PatchingMode Manual { get; } = new PatchingMode(ManualValue); + /// Disabled. + public static PatchingMode Disabled { get; } = new PatchingMode(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PatchingMode left, PatchingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PatchingMode left, PatchingMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PatchingMode(string value) => new PatchingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PatchingMode other && Equals(other); + /// + public bool Equals(PatchingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PreBuildStep.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PreBuildStep.Serialization.cs new file mode 100644 index 000000000000..c220814b00d0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PreBuildStep.Serialization.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class PreBuildStep : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PreBuildStep)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Scripts)) + { + writer.WritePropertyName("scripts"u8); + writer.WriteStartArray(); + foreach (var item in Scripts) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(HttpGet)) + { + writer.WritePropertyName("httpGet"u8); + writer.WriteObjectValue(HttpGet, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PreBuildStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PreBuildStep)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePreBuildStep(document.RootElement, options); + } + + internal static PreBuildStep DeserializePreBuildStep(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + IList scripts = default; + HttpGet httpGet = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("scripts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scripts = array; + continue; + } + if (property.NameEquals("httpGet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpGet = HttpGet.DeserializeHttpGet(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PreBuildStep(description, scripts ?? new ChangeTrackingList(), httpGet, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scripts), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scripts: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Scripts)) + { + if (Scripts.Any()) + { + builder.Append(" scripts: "); + builder.AppendLine("["); + foreach (var item in Scripts) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpGet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpGet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpGet)) + { + builder.Append(" httpGet: "); + BicepSerializationHelpers.AppendChildObject(builder, HttpGet, options, 2, false, " httpGet: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PreBuildStep)} does not support writing '{options.Format}' format."); + } + } + + PreBuildStep IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePreBuildStep(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PreBuildStep)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PreBuildStep.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PreBuildStep.cs new file mode 100644 index 000000000000..9ca424658f6f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/PreBuildStep.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Model representing a pre-build step. + public partial class PreBuildStep + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PreBuildStep() + { + Scripts = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Description of the pre-build step. + /// List of custom commands to run. + /// Http get request to send before the build. + /// Keeps track of any properties unknown to the library. + internal PreBuildStep(string description, IList scripts, HttpGet httpGet, IDictionary serializedAdditionalRawData) + { + Description = description; + Scripts = scripts; + HttpGet = httpGet; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Description of the pre-build step. + [WirePath("description")] + public string Description { get; set; } + /// List of custom commands to run. + [WirePath("scripts")] + public IList Scripts { get; } + /// Http get request to send before the build. + [WirePath("httpGet")] + public HttpGet HttpGet { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ReplicaExecutionStatus.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ReplicaExecutionStatus.Serialization.cs new file mode 100644 index 000000000000..08fe988e4221 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ReplicaExecutionStatus.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ReplicaExecutionStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReplicaExecutionStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Containers)) + { + writer.WritePropertyName("containers"u8); + writer.WriteStartArray(); + foreach (var item in Containers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ReplicaExecutionStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReplicaExecutionStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReplicaExecutionStatus(document.RootElement, options); + } + + internal static ReplicaExecutionStatus DeserializeReplicaExecutionStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IReadOnlyList containers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("containers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerExecutionStatus.DeserializeContainerExecutionStatus(item, options)); + } + containers = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReplicaExecutionStatus(name, containers ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Containers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Containers)) + { + if (Containers.Any()) + { + builder.Append(" containers: "); + builder.AppendLine("["); + foreach (var item in Containers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " containers: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ReplicaExecutionStatus)} does not support writing '{options.Format}' format."); + } + } + + ReplicaExecutionStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReplicaExecutionStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReplicaExecutionStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ReplicaExecutionStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ReplicaExecutionStatus.cs new file mode 100644 index 000000000000..4a71d08314be --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ReplicaExecutionStatus.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Container Apps Job execution replica status. + public partial class ReplicaExecutionStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ReplicaExecutionStatus() + { + Containers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Replica Name. + /// Containers in the execution replica. + /// Keeps track of any properties unknown to the library. + internal ReplicaExecutionStatus(string name, IReadOnlyList containers, IDictionary serializedAdditionalRawData) + { + Name = name; + Containers = containers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Replica Name. + [WirePath("name")] + public string Name { get; } + /// Containers in the execution replica. + [WirePath("containers")] + public IReadOnlyList Containers { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.Serialization.cs index 04d1be182ecc..0d1550b62374 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.Serialization.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - internal partial class Runtime : IUtf8JsonSerializable, IJsonModel + public partial class Runtime : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -40,6 +40,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("java"u8); writer.WriteObjectValue(Java, options); } + if (Optional.IsDefined(Dotnet)) + { + writer.WritePropertyName("dotnet"u8); + writer.WriteObjectValue(Dotnet, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,6 +83,7 @@ internal static Runtime DeserializeRuntime(JsonElement element, ModelReaderWrite return null; } RuntimeJava java = default; + RuntimeDotnet dotnet = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +97,22 @@ internal static Runtime DeserializeRuntime(JsonElement element, ModelReaderWrite java = RuntimeJava.DeserializeRuntimeJava(property.Value, options); continue; } + if (property.NameEquals("dotnet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dotnet = RuntimeDotnet.DeserializeRuntimeDotnet(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new Runtime(java, serializedAdditionalRawData); + return new Runtime(java, dotnet, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -111,14 +126,11 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("EnableMetrics", out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Java), out propertyOverride); if (hasPropertyOverride) { builder.Append(" java: "); - builder.AppendLine("{"); - builder.Append(" enableMetrics: "); builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); } else { @@ -129,6 +141,24 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("AutoConfigureDataProtection", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dotnet: "); + builder.AppendLine("{"); + builder.Append(" autoConfigureDataProtection: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Dotnet)) + { + builder.Append(" dotnet: "); + BicepSerializationHelpers.AppendChildObject(builder, Dotnet, options, 2, false, " dotnet: "); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.cs index 96c42be89b23..f16a3c091921 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Runtime.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.AppContainers.Models { /// Container App Runtime configuration. - internal partial class Runtime + public partial class Runtime { /// /// Keeps track of any properties unknown to the library. @@ -52,25 +52,30 @@ public Runtime() /// Initializes a new instance of . /// Java app configuration. + /// .NET app configuration. /// Keeps track of any properties unknown to the library. - internal Runtime(RuntimeJava java, IDictionary serializedAdditionalRawData) + internal Runtime(RuntimeJava java, RuntimeDotnet dotnet, IDictionary serializedAdditionalRawData) { Java = java; + Dotnet = dotnet; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Java app configuration. - internal RuntimeJava Java { get; set; } - /// Enable jmx core metrics for the java app. - [WirePath("java.enableMetrics")] - public bool? EnableMetrics + [WirePath("java")] + public RuntimeJava Java { get; set; } + /// .NET app configuration. + internal RuntimeDotnet Dotnet { get; set; } + /// Auto configure the ASP.NET Core Data Protection feature. + [WirePath("dotnet.autoConfigureDataProtection")] + public bool? AutoConfigureDataProtection { - get => Java is null ? default : Java.EnableMetrics; + get => Dotnet is null ? default : Dotnet.AutoConfigureDataProtection; set { - if (Java is null) - Java = new RuntimeJava(); - Java.EnableMetrics = value; + if (Dotnet is null) + Dotnet = new RuntimeDotnet(); + Dotnet.AutoConfigureDataProtection = value; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeDotnet.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeDotnet.Serialization.cs new file mode 100644 index 000000000000..ece333d4a967 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeDotnet.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class RuntimeDotnet : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeDotnet)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AutoConfigureDataProtection)) + { + writer.WritePropertyName("autoConfigureDataProtection"u8); + writer.WriteBooleanValue(AutoConfigureDataProtection.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RuntimeDotnet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeDotnet)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRuntimeDotnet(document.RootElement, options); + } + + internal static RuntimeDotnet DeserializeRuntimeDotnet(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? autoConfigureDataProtection = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoConfigureDataProtection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoConfigureDataProtection = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RuntimeDotnet(autoConfigureDataProtection, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AutoConfigureDataProtection), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" autoConfigureDataProtection: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AutoConfigureDataProtection)) + { + builder.Append(" autoConfigureDataProtection: "); + var boolValue = AutoConfigureDataProtection.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RuntimeDotnet)} does not support writing '{options.Format}' format."); + } + } + + RuntimeDotnet IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRuntimeDotnet(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RuntimeDotnet)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeDotnet.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeDotnet.cs new file mode 100644 index 000000000000..9222ca2ac942 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeDotnet.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// .NET app configuration. + internal partial class RuntimeDotnet + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RuntimeDotnet() + { + } + + /// Initializes a new instance of . + /// Auto configure the ASP.NET Core Data Protection feature. + /// Keeps track of any properties unknown to the library. + internal RuntimeDotnet(bool? autoConfigureDataProtection, IDictionary serializedAdditionalRawData) + { + AutoConfigureDataProtection = autoConfigureDataProtection; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Auto configure the ASP.NET Core Data Protection feature. + [WirePath("autoConfigureDataProtection")] + public bool? AutoConfigureDataProtection { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.Serialization.cs index df74e653b5fb..7f80ae43fdee 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.Serialization.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.AppContainers.Models { - internal partial class RuntimeJava : IUtf8JsonSerializable, IJsonModel + public partial class RuntimeJava : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -40,6 +40,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("enableMetrics"u8); writer.WriteBooleanValue(EnableMetrics.Value); } + if (Optional.IsDefined(JavaAgent)) + { + writer.WritePropertyName("javaAgent"u8); + writer.WriteObjectValue(JavaAgent, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,6 +83,7 @@ internal static RuntimeJava DeserializeRuntimeJava(JsonElement element, ModelRea return null; } bool? enableMetrics = default; + RuntimeJavaAgent javaAgent = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +97,22 @@ internal static RuntimeJava DeserializeRuntimeJava(JsonElement element, ModelRea enableMetrics = property.Value.GetBoolean(); continue; } + if (property.NameEquals("javaAgent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + javaAgent = RuntimeJavaAgent.DeserializeRuntimeJavaAgent(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new RuntimeJava(enableMetrics, serializedAdditionalRawData); + return new RuntimeJava(enableMetrics, javaAgent, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -127,6 +142,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(JavaAgent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" javaAgent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(JavaAgent)) + { + builder.Append(" javaAgent: "); + BicepSerializationHelpers.AppendChildObject(builder, JavaAgent, options, 2, false, " javaAgent: "); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.cs index 79048c735494..9628c2765d80 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJava.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.AppContainers.Models { /// Java app configuration. - internal partial class RuntimeJava + public partial class RuntimeJava { /// /// Keeps track of any properties unknown to the library. @@ -52,15 +52,20 @@ public RuntimeJava() /// Initializes a new instance of . /// Enable jmx core metrics for the java app. + /// Diagnostic capabilities achieved by java agent. /// Keeps track of any properties unknown to the library. - internal RuntimeJava(bool? enableMetrics, IDictionary serializedAdditionalRawData) + internal RuntimeJava(bool? enableMetrics, RuntimeJavaAgent javaAgent, IDictionary serializedAdditionalRawData) { EnableMetrics = enableMetrics; + JavaAgent = javaAgent; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Enable jmx core metrics for the java app. [WirePath("enableMetrics")] public bool? EnableMetrics { get; set; } + /// Diagnostic capabilities achieved by java agent. + [WirePath("javaAgent")] + public RuntimeJavaAgent JavaAgent { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgent.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgent.Serialization.cs new file mode 100644 index 000000000000..c842f6c5b046 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgent.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class RuntimeJavaAgent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeJavaAgent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(Logging)) + { + writer.WritePropertyName("logging"u8); + writer.WriteObjectValue(Logging, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RuntimeJavaAgent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeJavaAgent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRuntimeJavaAgent(document.RootElement, options); + } + + internal static RuntimeJavaAgent DeserializeRuntimeJavaAgent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + RuntimeJavaAgentLogging logging = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("logging"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logging = RuntimeJavaAgentLogging.DeserializeRuntimeJavaAgentLogging(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RuntimeJavaAgent(enabled, logging, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("LoggingLoggerSettings", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logging: "); + builder.AppendLine("{"); + builder.Append(" loggerSettings: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Logging)) + { + builder.Append(" logging: "); + BicepSerializationHelpers.AppendChildObject(builder, Logging, options, 2, false, " logging: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RuntimeJavaAgent)} does not support writing '{options.Format}' format."); + } + } + + RuntimeJavaAgent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRuntimeJavaAgent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RuntimeJavaAgent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgent.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgent.cs new file mode 100644 index 000000000000..d8358e1d131c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgent.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Diagnostic capabilities achieved by java agent. + public partial class RuntimeJavaAgent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RuntimeJavaAgent() + { + } + + /// Initializes a new instance of . + /// Enable java agent injection for the java app. + /// Capabilities on the java logging scenario. + /// Keeps track of any properties unknown to the library. + internal RuntimeJavaAgent(bool? isEnabled, RuntimeJavaAgentLogging logging, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + Logging = logging; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable java agent injection for the java app. + [WirePath("enabled")] + public bool? IsEnabled { get; set; } + /// Capabilities on the java logging scenario. + internal RuntimeJavaAgentLogging Logging { get; set; } + /// Settings of the logger for the java app. + [WirePath("logging.loggerSettings")] + public IList LoggingLoggerSettings + { + get + { + if (Logging is null) + Logging = new RuntimeJavaAgentLogging(); + return Logging.LoggerSettings; + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgentLogging.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgentLogging.Serialization.cs new file mode 100644 index 000000000000..65b8453d5a02 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgentLogging.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class RuntimeJavaAgentLogging : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeJavaAgentLogging)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(LoggerSettings)) + { + writer.WritePropertyName("loggerSettings"u8); + writer.WriteStartArray(); + foreach (var item in LoggerSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RuntimeJavaAgentLogging IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RuntimeJavaAgentLogging)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRuntimeJavaAgentLogging(document.RootElement, options); + } + + internal static RuntimeJavaAgentLogging DeserializeRuntimeJavaAgentLogging(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList loggerSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loggerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LoggerSetting.DeserializeLoggerSetting(item, options)); + } + loggerSettings = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RuntimeJavaAgentLogging(loggerSettings ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoggerSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loggerSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LoggerSettings)) + { + if (LoggerSettings.Any()) + { + builder.Append(" loggerSettings: "); + builder.AppendLine("["); + foreach (var item in LoggerSettings) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " loggerSettings: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RuntimeJavaAgentLogging)} does not support writing '{options.Format}' format."); + } + } + + RuntimeJavaAgentLogging IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRuntimeJavaAgentLogging(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RuntimeJavaAgentLogging)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgentLogging.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgentLogging.cs new file mode 100644 index 000000000000..a80f8c4b306d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/RuntimeJavaAgentLogging.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Capabilities on the java logging scenario. + internal partial class RuntimeJavaAgentLogging + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RuntimeJavaAgentLogging() + { + LoggerSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Settings of the logger for the java app. + /// Keeps track of any properties unknown to the library. + internal RuntimeJavaAgentLogging(IList loggerSettings, IDictionary serializedAdditionalRawData) + { + LoggerSettings = loggerSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Settings of the logger for the java app. + [WirePath("loggerSettings")] + public IList LoggerSettings { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ScgRoute.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ScgRoute.Serialization.cs new file mode 100644 index 000000000000..26fe6e69eb73 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ScgRoute.Serialization.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class ScgRoute : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScgRoute)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsCollectionDefined(Predicates)) + { + writer.WritePropertyName("predicates"u8); + writer.WriteStartArray(); + foreach (var item in Predicates) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteStartArray(); + foreach (var item in Filters) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Order)) + { + writer.WritePropertyName("order"u8); + writer.WriteNumberValue(Order.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ScgRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScgRoute)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScgRoute(document.RootElement, options); + } + + internal static ScgRoute DeserializeScgRoute(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + Uri uri = default; + IList predicates = default; + IList filters = default; + long? order = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("predicates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + predicates = array; + continue; + } + if (property.NameEquals("filters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + filters = array; + continue; + } + if (property.NameEquals("order"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + order = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScgRoute( + id, + uri, + predicates ?? new ChangeTrackingList(), + filters ?? new ChangeTrackingList(), + order, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" uri: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Predicates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" predicates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Predicates)) + { + if (Predicates.Any()) + { + builder.Append(" predicates: "); + builder.AppendLine("["); + foreach (var item in Predicates) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Filters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" filters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Filters)) + { + if (Filters.Any()) + { + builder.Append(" filters: "); + builder.AppendLine("["); + foreach (var item in Filters) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Order), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" order: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Order)) + { + builder.Append(" order: "); + builder.AppendLine($"'{Order.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ScgRoute)} does not support writing '{options.Format}' format."); + } + } + + ScgRoute IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeScgRoute(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScgRoute)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ScgRoute.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ScgRoute.cs new file mode 100644 index 000000000000..5c268d1ebbd0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ScgRoute.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Spring Cloud Gateway route definition. + public partial class ScgRoute + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Id of the route. + /// Uri of the route. + /// or is null. + public ScgRoute(string id, Uri uri) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(uri, nameof(uri)); + + Id = id; + Uri = uri; + Predicates = new ChangeTrackingList(); + Filters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Id of the route. + /// Uri of the route. + /// Predicates of the route. + /// Filters of the route. + /// Order of the route. + /// Keeps track of any properties unknown to the library. + internal ScgRoute(string id, Uri uri, IList predicates, IList filters, long? order, IDictionary serializedAdditionalRawData) + { + Id = id; + Uri = uri; + Predicates = predicates; + Filters = filters; + Order = order; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScgRoute() + { + } + + /// Id of the route. + [WirePath("id")] + public string Id { get; set; } + /// Uri of the route. + [WirePath("uri")] + public Uri Uri { get; set; } + /// Predicates of the route. + [WirePath("predicates")] + public IList Predicates { get; } + /// Filters of the route. + [WirePath("filters")] + public IList Filters { get; } + /// Order of the route. + [WirePath("order")] + public long? Order { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.Serialization.cs index 9a61e7d78697..687dc884677f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.Serialization.cs @@ -81,6 +81,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("resources"u8); writer.WriteObjectValue(Resources, options); } + if (Optional.IsCollectionDefined(Probes)) + { + writer.WritePropertyName("probes"u8); + writer.WriteStartArray(); + foreach (var item in Probes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -124,6 +134,7 @@ internal static SessionContainer DeserializeSessionContainer(JsonElement element IList args = default; IList env = default; SessionContainerResources resources = default; + IList probes = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -189,6 +200,20 @@ internal static SessionContainer DeserializeSessionContainer(JsonElement element resources = SessionContainerResources.DeserializeSessionContainerResources(property.Value, options); continue; } + if (property.NameEquals("probes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SessionProbe.DeserializeSessionProbe(item, options)); + } + probes = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -202,6 +227,7 @@ internal static SessionContainer DeserializeSessionContainer(JsonElement element args ?? new ChangeTrackingList(), env ?? new ChangeTrackingList(), resources, + probes ?? new ChangeTrackingList(), serializedAdditionalRawData); } @@ -372,6 +398,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Probes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" probes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Probes)) + { + if (Probes.Any()) + { + builder.Append(" probes: "); + builder.AppendLine("["); + foreach (var item in Probes) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " probes: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.cs index 7b60375f0083..83e8a690848d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionContainer.cs @@ -51,6 +51,7 @@ public SessionContainer() Command = new ChangeTrackingList(); Args = new ChangeTrackingList(); Env = new ChangeTrackingList(); + Probes = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -60,8 +61,9 @@ public SessionContainer() /// Container start command arguments. /// Container environment variables. /// Container resource requirements. + /// List of probes for the container. /// Keeps track of any properties unknown to the library. - internal SessionContainer(string image, string name, IList command, IList args, IList env, SessionContainerResources resources, IDictionary serializedAdditionalRawData) + internal SessionContainer(string image, string name, IList command, IList args, IList env, SessionContainerResources resources, IList probes, IDictionary serializedAdditionalRawData) { Image = image; Name = name; @@ -69,6 +71,7 @@ internal SessionContainer(string image, string name, IList command, ILis Args = args; Env = env; Resources = resources; + Probes = probes; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,5 +93,8 @@ internal SessionContainer(string image, string name, IList command, ILis /// Container resource requirements. [WirePath("resources")] public SessionContainerResources Resources { get; set; } + /// List of probes for the container. + [WirePath("probes")] + public IList Probes { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbe.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbe.Serialization.cs new file mode 100644 index 000000000000..2548348cdeef --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbe.Serialization.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class SessionProbe : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbe)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProbeType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ProbeType.Value.ToString()); + } + if (Optional.IsDefined(HttpGet)) + { + writer.WritePropertyName("httpGet"u8); + writer.WriteObjectValue(HttpGet, options); + } + if (Optional.IsDefined(TcpSocket)) + { + writer.WritePropertyName("tcpSocket"u8); + writer.WriteObjectValue(TcpSocket, options); + } + if (Optional.IsDefined(FailureThreshold)) + { + writer.WritePropertyName("failureThreshold"u8); + writer.WriteNumberValue(FailureThreshold.Value); + } + if (Optional.IsDefined(InitialDelaySeconds)) + { + writer.WritePropertyName("initialDelaySeconds"u8); + writer.WriteNumberValue(InitialDelaySeconds.Value); + } + if (Optional.IsDefined(PeriodSeconds)) + { + writer.WritePropertyName("periodSeconds"u8); + writer.WriteNumberValue(PeriodSeconds.Value); + } + if (Optional.IsDefined(SuccessThreshold)) + { + writer.WritePropertyName("successThreshold"u8); + writer.WriteNumberValue(SuccessThreshold.Value); + } + if (Optional.IsDefined(TerminationGracePeriodSeconds)) + { + writer.WritePropertyName("terminationGracePeriodSeconds"u8); + writer.WriteNumberValue(TerminationGracePeriodSeconds.Value); + } + if (Optional.IsDefined(TimeoutSeconds)) + { + writer.WritePropertyName("timeoutSeconds"u8); + writer.WriteNumberValue(TimeoutSeconds.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SessionProbe IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbe)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSessionProbe(document.RootElement, options); + } + + internal static SessionProbe DeserializeSessionProbe(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SessionProbeType? type = default; + SessionProbeHttpGet httpGet = default; + SessionProbeTcpSocket tcpSocket = default; + int? failureThreshold = default; + int? initialDelaySeconds = default; + int? periodSeconds = default; + int? successThreshold = default; + long? terminationGracePeriodSeconds = default; + int? timeoutSeconds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new SessionProbeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("httpGet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpGet = SessionProbeHttpGet.DeserializeSessionProbeHttpGet(property.Value, options); + continue; + } + if (property.NameEquals("tcpSocket"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tcpSocket = SessionProbeTcpSocket.DeserializeSessionProbeTcpSocket(property.Value, options); + continue; + } + if (property.NameEquals("failureThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failureThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("initialDelaySeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialDelaySeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("periodSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + periodSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("successThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + successThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("terminationGracePeriodSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + terminationGracePeriodSeconds = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("timeoutSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeoutSeconds = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SessionProbe( + type, + httpGet, + tcpSocket, + failureThreshold, + initialDelaySeconds, + periodSeconds, + successThreshold, + terminationGracePeriodSeconds, + timeoutSeconds, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProbeType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProbeType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ProbeType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpGet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpGet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpGet)) + { + builder.Append(" httpGet: "); + BicepSerializationHelpers.AppendChildObject(builder, HttpGet, options, 2, false, " httpGet: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TcpSocket), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tcpSocket: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TcpSocket)) + { + builder.Append(" tcpSocket: "); + BicepSerializationHelpers.AppendChildObject(builder, TcpSocket, options, 2, false, " tcpSocket: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FailureThreshold), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" failureThreshold: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FailureThreshold)) + { + builder.Append(" failureThreshold: "); + builder.AppendLine($"{FailureThreshold.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InitialDelaySeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" initialDelaySeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InitialDelaySeconds)) + { + builder.Append(" initialDelaySeconds: "); + builder.AppendLine($"{InitialDelaySeconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PeriodSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" periodSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PeriodSeconds)) + { + builder.Append(" periodSeconds: "); + builder.AppendLine($"{PeriodSeconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuccessThreshold), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" successThreshold: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SuccessThreshold)) + { + builder.Append(" successThreshold: "); + builder.AppendLine($"{SuccessThreshold.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TerminationGracePeriodSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" terminationGracePeriodSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TerminationGracePeriodSeconds)) + { + builder.Append(" terminationGracePeriodSeconds: "); + builder.AppendLine($"'{TerminationGracePeriodSeconds.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeoutSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeoutSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeoutSeconds)) + { + builder.Append(" timeoutSeconds: "); + builder.AppendLine($"{TimeoutSeconds.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SessionProbe)} does not support writing '{options.Format}' format."); + } + } + + SessionProbe IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSessionProbe(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SessionProbe)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbe.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbe.cs new file mode 100644 index 000000000000..dc1b2eba3461 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbe.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Session probe configuration. + public partial class SessionProbe + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SessionProbe() + { + } + + /// Initializes a new instance of . + /// Denotes the type of probe. Can be Liveness or Startup, Readiness probe is not supported in sessions. Type must be unique for each probe within the context of a list of probes (SessionProbes). + /// HTTPGet specifies the http request to perform. + /// TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. + /// Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. + /// Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. + /// How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. + /// Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. + /// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour). + /// Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. + /// Keeps track of any properties unknown to the library. + internal SessionProbe(SessionProbeType? probeType, SessionProbeHttpGet httpGet, SessionProbeTcpSocket tcpSocket, int? failureThreshold, int? initialDelaySeconds, int? periodSeconds, int? successThreshold, long? terminationGracePeriodSeconds, int? timeoutSeconds, IDictionary serializedAdditionalRawData) + { + ProbeType = probeType; + HttpGet = httpGet; + TcpSocket = tcpSocket; + FailureThreshold = failureThreshold; + InitialDelaySeconds = initialDelaySeconds; + PeriodSeconds = periodSeconds; + SuccessThreshold = successThreshold; + TerminationGracePeriodSeconds = terminationGracePeriodSeconds; + TimeoutSeconds = timeoutSeconds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Denotes the type of probe. Can be Liveness or Startup, Readiness probe is not supported in sessions. Type must be unique for each probe within the context of a list of probes (SessionProbes). + [WirePath("type")] + public SessionProbeType? ProbeType { get; set; } + /// HTTPGet specifies the http request to perform. + [WirePath("httpGet")] + public SessionProbeHttpGet HttpGet { get; set; } + /// TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. + [WirePath("tcpSocket")] + public SessionProbeTcpSocket TcpSocket { get; set; } + /// Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. + [WirePath("failureThreshold")] + public int? FailureThreshold { get; set; } + /// Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. + [WirePath("initialDelaySeconds")] + public int? InitialDelaySeconds { get; set; } + /// How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. + [WirePath("periodSeconds")] + public int? PeriodSeconds { get; set; } + /// Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. + [WirePath("successThreshold")] + public int? SuccessThreshold { get; set; } + /// Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour). + [WirePath("terminationGracePeriodSeconds")] + public long? TerminationGracePeriodSeconds { get; set; } + /// Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. + [WirePath("timeoutSeconds")] + public int? TimeoutSeconds { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGet.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGet.Serialization.cs new file mode 100644 index 000000000000..0d91e8f46af2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGet.Serialization.cs @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class SessionProbeHttpGet : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbeHttpGet)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Host)) + { + writer.WritePropertyName("host"u8); + writer.WriteStringValue(Host); + } + if (Optional.IsCollectionDefined(HttpHeaders)) + { + writer.WritePropertyName("httpHeaders"u8); + writer.WriteStartArray(); + foreach (var item in HttpHeaders) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port); + if (Optional.IsDefined(Scheme)) + { + writer.WritePropertyName("scheme"u8); + writer.WriteStringValue(Scheme.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SessionProbeHttpGet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbeHttpGet)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSessionProbeHttpGet(document.RootElement, options); + } + + internal static SessionProbeHttpGet DeserializeSessionProbeHttpGet(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string host = default; + IList httpHeaders = default; + string path = default; + int port = default; + ContainerAppHttpScheme? scheme = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("host"u8)) + { + host = property.Value.GetString(); + continue; + } + if (property.NameEquals("httpHeaders"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SessionProbeHttpGetHttpHeadersItem.DeserializeSessionProbeHttpGetHttpHeadersItem(item, options)); + } + httpHeaders = array; + continue; + } + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("port"u8)) + { + port = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scheme"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheme = new ContainerAppHttpScheme(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SessionProbeHttpGet( + host, + httpHeaders ?? new ChangeTrackingList(), + path, + port, + scheme, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Host), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" host: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Host)) + { + builder.Append(" host: "); + if (Host.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Host}'''"); + } + else + { + builder.AppendLine($"'{Host}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpHeaders), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpHeaders: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(HttpHeaders)) + { + if (HttpHeaders.Any()) + { + builder.Append(" httpHeaders: "); + builder.AppendLine("["); + foreach (var item in HttpHeaders) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " httpHeaders: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Port), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" port: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" port: "); + builder.AppendLine($"{Port}"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scheme)) + { + builder.Append(" scheme: "); + builder.AppendLine($"'{Scheme.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SessionProbeHttpGet)} does not support writing '{options.Format}' format."); + } + } + + SessionProbeHttpGet IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSessionProbeHttpGet(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SessionProbeHttpGet)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGet.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGet.cs new file mode 100644 index 000000000000..3f2944460794 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGet.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// HTTPGet specifies the http request to perform. + public partial class SessionProbeHttpGet + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + public SessionProbeHttpGet(int port) + { + HttpHeaders = new ChangeTrackingList(); + Port = port; + } + + /// Initializes a new instance of . + /// Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + /// Custom headers to set in the request. HTTP allows repeated headers. + /// Path to access on the HTTP server. + /// Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + /// Scheme to use for connecting to the host. Defaults to HTTP. + /// Keeps track of any properties unknown to the library. + internal SessionProbeHttpGet(string host, IList httpHeaders, string path, int port, ContainerAppHttpScheme? scheme, IDictionary serializedAdditionalRawData) + { + Host = host; + HttpHeaders = httpHeaders; + Path = path; + Port = port; + Scheme = scheme; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SessionProbeHttpGet() + { + } + + /// Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + [WirePath("host")] + public string Host { get; set; } + /// Custom headers to set in the request. HTTP allows repeated headers. + [WirePath("httpHeaders")] + public IList HttpHeaders { get; } + /// Path to access on the HTTP server. + [WirePath("path")] + public string Path { get; set; } + /// Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + [WirePath("port")] + public int Port { get; set; } + /// Scheme to use for connecting to the host. Defaults to HTTP. + [WirePath("scheme")] + public ContainerAppHttpScheme? Scheme { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGetHttpHeadersItem.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGetHttpHeadersItem.Serialization.cs new file mode 100644 index 000000000000..4929559b4a4b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGetHttpHeadersItem.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class SessionProbeHttpGetHttpHeadersItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbeHttpGetHttpHeadersItem)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SessionProbeHttpGetHttpHeadersItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbeHttpGetHttpHeadersItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSessionProbeHttpGetHttpHeadersItem(document.RootElement, options); + } + + internal static SessionProbeHttpGetHttpHeadersItem DeserializeSessionProbeHttpGetHttpHeadersItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SessionProbeHttpGetHttpHeadersItem(name, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SessionProbeHttpGetHttpHeadersItem)} does not support writing '{options.Format}' format."); + } + } + + SessionProbeHttpGetHttpHeadersItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSessionProbeHttpGetHttpHeadersItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SessionProbeHttpGetHttpHeadersItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGetHttpHeadersItem.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGetHttpHeadersItem.cs new file mode 100644 index 000000000000..c38b8bfb8f26 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeHttpGetHttpHeadersItem.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// HTTPHeader describes a custom header to be used in HTTP probes. + public partial class SessionProbeHttpGetHttpHeadersItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The header field name. + /// The header field value. + /// or is null. + public SessionProbeHttpGetHttpHeadersItem(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// The header field name. + /// The header field value. + /// Keeps track of any properties unknown to the library. + internal SessionProbeHttpGetHttpHeadersItem(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SessionProbeHttpGetHttpHeadersItem() + { + } + + /// The header field name. + [WirePath("name")] + public string Name { get; set; } + /// The header field value. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeTcpSocket.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeTcpSocket.Serialization.cs new file mode 100644 index 000000000000..110e72b68097 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeTcpSocket.Serialization.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class SessionProbeTcpSocket : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbeTcpSocket)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Host)) + { + writer.WritePropertyName("host"u8); + writer.WriteStringValue(Host); + } + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SessionProbeTcpSocket IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SessionProbeTcpSocket)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSessionProbeTcpSocket(document.RootElement, options); + } + + internal static SessionProbeTcpSocket DeserializeSessionProbeTcpSocket(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string host = default; + int port = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("host"u8)) + { + host = property.Value.GetString(); + continue; + } + if (property.NameEquals("port"u8)) + { + port = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SessionProbeTcpSocket(host, port, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Host), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" host: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Host)) + { + builder.Append(" host: "); + if (Host.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Host}'''"); + } + else + { + builder.AppendLine($"'{Host}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Port), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" port: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" port: "); + builder.AppendLine($"{Port}"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SessionProbeTcpSocket)} does not support writing '{options.Format}' format."); + } + } + + SessionProbeTcpSocket IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSessionProbeTcpSocket(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SessionProbeTcpSocket)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeTcpSocket.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeTcpSocket.cs new file mode 100644 index 000000000000..6d4eebe76202 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeTcpSocket.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. + public partial class SessionProbeTcpSocket + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + public SessionProbeTcpSocket(int port) + { + Port = port; + } + + /// Initializes a new instance of . + /// Optional: Host name to connect to, defaults to the pod IP. + /// Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + /// Keeps track of any properties unknown to the library. + internal SessionProbeTcpSocket(string host, int port, IDictionary serializedAdditionalRawData) + { + Host = host; + Port = port; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SessionProbeTcpSocket() + { + } + + /// Optional: Host name to connect to, defaults to the pod IP. + [WirePath("host")] + public string Host { get; set; } + /// Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + [WirePath("port")] + public int Port { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeType.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeType.cs new file mode 100644 index 000000000000..e37f608babd9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SessionProbeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Denotes the type of probe. Can be Liveness or Startup, Readiness probe is not supported in sessions. Type must be unique for each probe within the context of a list of probes (SessionProbes). + public readonly partial struct SessionProbeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SessionProbeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LivenessValue = "Liveness"; + private const string StartupValue = "Startup"; + + /// Liveness. + public static SessionProbeType Liveness { get; } = new SessionProbeType(LivenessValue); + /// Startup. + public static SessionProbeType Startup { get; } = new SessionProbeType(StartupValue); + /// Determines if two values are the same. + public static bool operator ==(SessionProbeType left, SessionProbeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SessionProbeType left, SessionProbeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SessionProbeType(string value) => new SessionProbeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SessionProbeType other && Equals(other); + /// + public bool Equals(SessionProbeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SmbStorage.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SmbStorage.Serialization.cs new file mode 100644 index 000000000000..22920ead7d27 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SmbStorage.Serialization.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class SmbStorage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SmbStorage)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Host)) + { + writer.WritePropertyName("host"u8); + writer.WriteStringValue(Host); + } + if (Optional.IsDefined(ShareName)) + { + writer.WritePropertyName("shareName"u8); + writer.WriteStringValue(ShareName); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(AccessMode)) + { + writer.WritePropertyName("accessMode"u8); + writer.WriteStringValue(AccessMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SmbStorage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SmbStorage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSmbStorage(document.RootElement, options); + } + + internal static SmbStorage DeserializeSmbStorage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string host = default; + string shareName = default; + string username = default; + string domain = default; + string password = default; + ContainerAppAccessMode? accessMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("host"u8)) + { + host = property.Value.GetString(); + continue; + } + if (property.NameEquals("shareName"u8)) + { + shareName = property.Value.GetString(); + continue; + } + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessMode = new ContainerAppAccessMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SmbStorage( + host, + shareName, + username, + domain, + password, + accessMode, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Host), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" host: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Host)) + { + builder.Append(" host: "); + if (Host.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Host}'''"); + } + else + { + builder.AppendLine($"'{Host}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ShareName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" shareName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ShareName)) + { + builder.Append(" shareName: "); + if (ShareName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ShareName}'''"); + } + else + { + builder.AppendLine($"'{ShareName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Username), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" username: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Username)) + { + builder.Append(" username: "); + if (Username.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Username}'''"); + } + else + { + builder.AppendLine($"'{Username}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Domain), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" domain: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Domain)) + { + builder.Append(" domain: "); + if (Domain.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Domain}'''"); + } + else + { + builder.AppendLine($"'{Domain}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Password), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" password: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Password)) + { + builder.Append(" password: "); + if (Password.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Password}'''"); + } + else + { + builder.AppendLine($"'{Password}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessMode)) + { + builder.Append(" accessMode: "); + builder.AppendLine($"'{AccessMode.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SmbStorage)} does not support writing '{options.Format}' format."); + } + } + + SmbStorage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSmbStorage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SmbStorage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SmbStorage.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SmbStorage.cs new file mode 100644 index 000000000000..5f597aa90754 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SmbStorage.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// SMB storage properties. + public partial class SmbStorage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SmbStorage() + { + } + + /// Initializes a new instance of . + /// The host name or IP address of the SMB server. + /// The path to the SMB shared folder. + /// The user to log on to the SMB server. + /// The domain name for the user. + /// The password for the user. + /// Access mode for storage. + /// Keeps track of any properties unknown to the library. + internal SmbStorage(string host, string shareName, string username, string domain, string password, ContainerAppAccessMode? accessMode, IDictionary serializedAdditionalRawData) + { + Host = host; + ShareName = shareName; + Username = username; + Domain = domain; + Password = password; + AccessMode = accessMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The host name or IP address of the SMB server. + [WirePath("host")] + public string Host { get; set; } + /// The path to the SMB shared folder. + [WirePath("shareName")] + public string ShareName { get; set; } + /// The user to log on to the SMB server. + [WirePath("username")] + public string Username { get; set; } + /// The domain name for the user. + [WirePath("domain")] + public string Domain { get; set; } + /// The password for the user. + [WirePath("password")] + public string Password { get; set; } + /// Access mode for storage. + [WirePath("accessMode")] + public ContainerAppAccessMode? AccessMode { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SpringCloudGatewayComponent.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SpringCloudGatewayComponent.Serialization.cs new file mode 100644 index 000000000000..e2d1885ce9b2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SpringCloudGatewayComponent.Serialization.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class SpringCloudGatewayComponent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SpringCloudGatewayComponent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Ingress)) + { + writer.WritePropertyName("ingress"u8); + writer.WriteObjectValue(Ingress, options); + } + if (Optional.IsCollectionDefined(SpringCloudGatewayRoutes)) + { + writer.WritePropertyName("springCloudGatewayRoutes"u8); + writer.WriteStartArray(); + foreach (var item in SpringCloudGatewayRoutes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + SpringCloudGatewayComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SpringCloudGatewayComponent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSpringCloudGatewayComponent(document.RootElement, options); + } + + internal static SpringCloudGatewayComponent DeserializeSpringCloudGatewayComponent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + JavaComponentIngress ingress = default; + IList springCloudGatewayRoutes = default; + JavaComponentType componentType = default; + JavaComponentProvisioningState? provisioningState = default; + IList configurations = default; + JavaComponentPropertiesScale scale = default; + IList serviceBinds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ingress"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ingress = JavaComponentIngress.DeserializeJavaComponentIngress(property.Value, options); + continue; + } + if (property.NameEquals("springCloudGatewayRoutes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScgRoute.DeserializeScgRoute(item, options)); + } + springCloudGatewayRoutes = array; + continue; + } + if (property.NameEquals("componentType"u8)) + { + componentType = new JavaComponentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new JavaComponentProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("configurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JavaComponentConfigurationProperty.DeserializeJavaComponentConfigurationProperty(item, options)); + } + configurations = array; + continue; + } + if (property.NameEquals("scale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scale = JavaComponentPropertiesScale.DeserializeJavaComponentPropertiesScale(property.Value, options); + continue; + } + if (property.NameEquals("serviceBinds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JavaComponentServiceBind.DeserializeJavaComponentServiceBind(item, options)); + } + serviceBinds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SpringCloudGatewayComponent( + componentType, + provisioningState, + configurations ?? new ChangeTrackingList(), + scale, + serviceBinds ?? new ChangeTrackingList(), + serializedAdditionalRawData, + ingress, + springCloudGatewayRoutes ?? new ChangeTrackingList()); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IngressFqdn", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ingress: "); + builder.AppendLine("{"); + builder.Append(" fqdn: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Ingress)) + { + builder.Append(" ingress: "); + BicepSerializationHelpers.AppendChildObject(builder, Ingress, options, 2, false, " ingress: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SpringCloudGatewayRoutes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" springCloudGatewayRoutes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SpringCloudGatewayRoutes)) + { + if (SpringCloudGatewayRoutes.Any()) + { + builder.Append(" springCloudGatewayRoutes: "); + builder.AppendLine("["); + foreach (var item in SpringCloudGatewayRoutes) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " springCloudGatewayRoutes: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComponentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" componentType: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" componentType: "); + builder.AppendLine($"'{ComponentType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Configurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Configurations)) + { + if (Configurations.Any()) + { + builder.Append(" configurations: "); + builder.AppendLine("["); + foreach (var item in Configurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " configurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scale), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scale: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scale)) + { + builder.Append(" scale: "); + BicepSerializationHelpers.AppendChildObject(builder, Scale, options, 2, false, " scale: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceBinds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceBinds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServiceBinds)) + { + if (ServiceBinds.Any()) + { + builder.Append(" serviceBinds: "); + builder.AppendLine("["); + foreach (var item in ServiceBinds) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " serviceBinds: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SpringCloudGatewayComponent)} does not support writing '{options.Format}' format."); + } + } + + SpringCloudGatewayComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSpringCloudGatewayComponent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SpringCloudGatewayComponent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SpringCloudGatewayComponent.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SpringCloudGatewayComponent.cs new file mode 100644 index 000000000000..02ecbd222ca9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/SpringCloudGatewayComponent.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Spring Cloud Gateway properties. + public partial class SpringCloudGatewayComponent : JavaComponentProperties + { + /// Initializes a new instance of . + public SpringCloudGatewayComponent() + { + SpringCloudGatewayRoutes = new ChangeTrackingList(); + ComponentType = JavaComponentType.SpringCloudGateway; + } + + /// Initializes a new instance of . + /// Type of the Java Component. + /// Provisioning state of the Java Component. + /// List of Java Components configuration properties. + /// Java component scaling configurations. + /// List of Java Components that are bound to the Java component. + /// Keeps track of any properties unknown to the library. + /// Java Component Ingress configurations. + /// Gateway route definition. + internal SpringCloudGatewayComponent(JavaComponentType componentType, JavaComponentProvisioningState? provisioningState, IList configurations, JavaComponentPropertiesScale scale, IList serviceBinds, IDictionary serializedAdditionalRawData, JavaComponentIngress ingress, IList springCloudGatewayRoutes) : base(componentType, provisioningState, configurations, scale, serviceBinds, serializedAdditionalRawData) + { + Ingress = ingress; + SpringCloudGatewayRoutes = springCloudGatewayRoutes; + ComponentType = componentType; + } + + /// Java Component Ingress configurations. + internal JavaComponentIngress Ingress { get; set; } + /// Hostname of the Java Component endpoint. + [WirePath("ingress.fqdn")] + public string IngressFqdn + { + get => Ingress is null ? default : Ingress.Fqdn; + } + + /// Gateway route definition. + [WirePath("springCloudGatewayRoutes")] + public IList SpringCloudGatewayRoutes { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Status.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Status.cs new file mode 100644 index 000000000000..b8a83bfa1a11 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/Status.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Status of the label history record. + public readonly partial struct Status : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Status(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string StartingValue = "Starting"; + + /// Succeeded. + public static Status Succeeded { get; } = new Status(SucceededValue); + /// Failed. + public static Status Failed { get; } = new Status(FailedValue); + /// Starting. + public static Status Starting { get; } = new Status(StartingValue); + /// Determines if two values are the same. + public static bool operator ==(Status left, Status right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Status left, Status right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Status(string value) => new Status(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Status other && Equals(other); + /// + public bool Equals(Status other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpConnectionPool.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpConnectionPool.Serialization.cs new file mode 100644 index 000000000000..86a277f0b51a --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpConnectionPool.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class TcpConnectionPool : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TcpConnectionPool)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MaxConnections)) + { + writer.WritePropertyName("maxConnections"u8); + writer.WriteNumberValue(MaxConnections.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TcpConnectionPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TcpConnectionPool)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTcpConnectionPool(document.RootElement, options); + } + + internal static TcpConnectionPool DeserializeTcpConnectionPool(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? maxConnections = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxConnections"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxConnections = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TcpConnectionPool(maxConnections, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxConnections)) + { + builder.Append(" maxConnections: "); + builder.AppendLine($"{MaxConnections.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(TcpConnectionPool)} does not support writing '{options.Format}' format."); + } + } + + TcpConnectionPool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTcpConnectionPool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TcpConnectionPool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpConnectionPool.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpConnectionPool.cs new file mode 100644 index 000000000000..a4d477857c84 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpConnectionPool.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Defines parameters for tcp connection pooling. + internal partial class TcpConnectionPool + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TcpConnectionPool() + { + } + + /// Initializes a new instance of . + /// Maximum number of tcp connections allowed. + /// Keeps track of any properties unknown to the library. + internal TcpConnectionPool(int? maxConnections, IDictionary serializedAdditionalRawData) + { + MaxConnections = maxConnections; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Maximum number of tcp connections allowed. + [WirePath("maxConnections")] + public int? MaxConnections { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpRetryPolicy.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpRetryPolicy.Serialization.cs new file mode 100644 index 000000000000..f2c6ac8de5a4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpRetryPolicy.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + internal partial class TcpRetryPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TcpRetryPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MaxConnectAttempts)) + { + writer.WritePropertyName("maxConnectAttempts"u8); + writer.WriteNumberValue(MaxConnectAttempts.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TcpRetryPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TcpRetryPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTcpRetryPolicy(document.RootElement, options); + } + + internal static TcpRetryPolicy DeserializeTcpRetryPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? maxConnectAttempts = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxConnectAttempts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxConnectAttempts = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TcpRetryPolicy(maxConnectAttempts, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxConnectAttempts), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxConnectAttempts: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxConnectAttempts)) + { + builder.Append(" maxConnectAttempts: "); + builder.AppendLine($"{MaxConnectAttempts.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(TcpRetryPolicy)} does not support writing '{options.Format}' format."); + } + } + + TcpRetryPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTcpRetryPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TcpRetryPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpRetryPolicy.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpRetryPolicy.cs new file mode 100644 index 000000000000..d6151534e601 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TcpRetryPolicy.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Policy that defines tcp request retry conditions. + internal partial class TcpRetryPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TcpRetryPolicy() + { + } + + /// Initializes a new instance of . + /// Maximum number of attempts to connect to the tcp service. + /// Keeps track of any properties unknown to the library. + internal TcpRetryPolicy(int? maxConnectAttempts, IDictionary serializedAdditionalRawData) + { + MaxConnectAttempts = maxConnectAttempts; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Maximum number of attempts to connect to the tcp service. + [WirePath("maxConnectAttempts")] + public int? MaxConnectAttempts { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplatePoolStatus.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplatePoolStatus.Serialization.cs new file mode 100644 index 000000000000..3f93e5ff0543 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplatePoolStatus.Serialization.cs @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class TemplatePoolStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TemplatePoolStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ExpectedCount)) + { + writer.WritePropertyName("expectedCount"u8); + writer.WriteNumberValue(ExpectedCount.Value); + } + if (Optional.IsDefined(ReadyCount)) + { + writer.WritePropertyName("readyCount"u8); + writer.WriteNumberValue(ReadyCount.Value); + } + if (Optional.IsDefined(PendingCount)) + { + writer.WritePropertyName("pendingCount"u8); + writer.WriteNumberValue(PendingCount.Value); + } + if (Optional.IsDefined(ImagePullFailCount)) + { + writer.WritePropertyName("imagePullFailCount"u8); + writer.WriteNumberValue(ImagePullFailCount.Value); + } + if (Optional.IsDefined(CrashCount)) + { + writer.WritePropertyName("crashCount"u8); + writer.WriteNumberValue(CrashCount.Value); + } + if (Optional.IsDefined(AllocatedCount)) + { + writer.WritePropertyName("allocatedCount"u8); + writer.WriteNumberValue(AllocatedCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TemplatePoolStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TemplatePoolStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTemplatePoolStatus(document.RootElement, options); + } + + internal static TemplatePoolStatus DeserializeTemplatePoolStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? expectedCount = default; + int? readyCount = default; + int? pendingCount = default; + int? imagePullFailCount = default; + int? crashCount = default; + int? allocatedCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expectedCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("readyCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readyCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("pendingCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pendingCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("imagePullFailCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imagePullFailCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("crashCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + crashCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("allocatedCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TemplatePoolStatus( + expectedCount, + readyCount, + pendingCount, + imagePullFailCount, + crashCount, + allocatedCount, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpectedCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expectedCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExpectedCount)) + { + builder.Append(" expectedCount: "); + builder.AppendLine($"{ExpectedCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReadyCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" readyCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReadyCount)) + { + builder.Append(" readyCount: "); + builder.AppendLine($"{ReadyCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PendingCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" pendingCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PendingCount)) + { + builder.Append(" pendingCount: "); + builder.AppendLine($"{PendingCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ImagePullFailCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" imagePullFailCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ImagePullFailCount)) + { + builder.Append(" imagePullFailCount: "); + builder.AppendLine($"{ImagePullFailCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CrashCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" crashCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CrashCount)) + { + builder.Append(" crashCount: "); + builder.AppendLine($"{CrashCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllocatedCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allocatedCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AllocatedCount)) + { + builder.Append(" allocatedCount: "); + builder.AppendLine($"{AllocatedCount.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(TemplatePoolStatus)} does not support writing '{options.Format}' format."); + } + } + + TemplatePoolStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTemplatePoolStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TemplatePoolStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplatePoolStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplatePoolStatus.cs new file mode 100644 index 000000000000..d041284ffb38 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplatePoolStatus.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The status of pods in the pool of this template. + public partial class TemplatePoolStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal TemplatePoolStatus() + { + } + + /// Initializes a new instance of . + /// The expected count of pods in this pool. + /// The ready count of pods in this pool. + /// The pending count of pods in this pool. + /// The image pull fail count of pods in this pool. + /// The crash count of pods in this pool. + /// The allocated count of pods in this pool. + /// Keeps track of any properties unknown to the library. + internal TemplatePoolStatus(int? expectedCount, int? readyCount, int? pendingCount, int? imagePullFailCount, int? crashCount, int? allocatedCount, IDictionary serializedAdditionalRawData) + { + ExpectedCount = expectedCount; + ReadyCount = readyCount; + PendingCount = pendingCount; + ImagePullFailCount = imagePullFailCount; + CrashCount = crashCount; + AllocatedCount = allocatedCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The expected count of pods in this pool. + [WirePath("expectedCount")] + public int? ExpectedCount { get; } + /// The ready count of pods in this pool. + [WirePath("readyCount")] + public int? ReadyCount { get; } + /// The pending count of pods in this pool. + [WirePath("pendingCount")] + public int? PendingCount { get; } + /// The image pull fail count of pods in this pool. + [WirePath("imagePullFailCount")] + public int? ImagePullFailCount { get; } + /// The crash count of pods in this pool. + [WirePath("crashCount")] + public int? CrashCount { get; } + /// The allocated count of pods in this pool. + [WirePath("allocatedCount")] + public int? AllocatedCount { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateStatus.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateStatus.Serialization.cs new file mode 100644 index 000000000000..6c160cf8f12c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateStatus.Serialization.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class TemplateStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TemplateStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStringValue(Details); + } + if (Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status, options); + } + if (Optional.IsCollectionDefined(Containers)) + { + writer.WritePropertyName("containers"u8); + writer.WriteStartArray(); + foreach (var item in Containers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Ingress)) + { + writer.WritePropertyName("ingress"u8); + writer.WriteObjectValue(Ingress, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TemplateStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TemplateStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTemplateStatus(document.RootElement, options); + } + + internal static TemplateStatus DeserializeTemplateStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string details = default; + DateTimeOffset? createdTime = default; + TemplatePoolStatus status = default; + IReadOnlyList containers = default; + SessionIngress ingress = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("details"u8)) + { + details = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = TemplatePoolStatus.DeserializeTemplatePoolStatus(property.Value, options); + continue; + } + if (property.NameEquals("containers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SessionContainer.DeserializeSessionContainer(item, options)); + } + containers = array; + continue; + } + if (property.NameEquals("ingress"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ingress = SessionIngress.DeserializeSessionIngress(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TemplateStatus( + details, + createdTime, + status, + containers ?? new ChangeTrackingList(), + ingress, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Details), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" details: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Details)) + { + builder.Append(" details: "); + if (Details.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Details}'''"); + } + else + { + builder.AppendLine($"'{Details}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + BicepSerializationHelpers.AppendChildObject(builder, Status, options, 2, false, " status: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Containers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Containers)) + { + if (Containers.Any()) + { + builder.Append(" containers: "); + builder.AppendLine("["); + foreach (var item in Containers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " containers: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IngressTargetPort", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ingress: "); + builder.AppendLine("{"); + builder.Append(" targetPort: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Ingress)) + { + builder.Append(" ingress: "); + BicepSerializationHelpers.AppendChildObject(builder, Ingress, options, 2, false, " ingress: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(TemplateStatus)} does not support writing '{options.Format}' format."); + } + } + + TemplateStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTemplateStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TemplateStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateStatus.cs new file mode 100644 index 000000000000..2e87ab578ff1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateStatus.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The status of the session pool template. + public partial class TemplateStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal TemplateStatus() + { + Containers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The detailed status of this template. + /// The creation time of this template. + /// The status of this template. + /// List of container definitions for the sessions of this template. + /// Session pool ingress configuration of this template. + /// Keeps track of any properties unknown to the library. + internal TemplateStatus(string details, DateTimeOffset? createdOn, TemplatePoolStatus status, IReadOnlyList containers, SessionIngress ingress, IDictionary serializedAdditionalRawData) + { + Details = details; + CreatedOn = createdOn; + Status = status; + Containers = containers; + Ingress = ingress; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The detailed status of this template. + [WirePath("details")] + public string Details { get; } + /// The creation time of this template. + [WirePath("createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// The status of this template. + [WirePath("status")] + public TemplatePoolStatus Status { get; } + /// List of container definitions for the sessions of this template. + [WirePath("containers")] + public IReadOnlyList Containers { get; } + /// Session pool ingress configuration of this template. + internal SessionIngress Ingress { get; } + /// Target port in containers for traffic from ingress. + [WirePath("ingress.targetPort")] + public int? IngressTargetPort + { + get => Ingress?.TargetPort; + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateUpdateStatus.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateUpdateStatus.Serialization.cs new file mode 100644 index 000000000000..c17d17eff9eb --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateUpdateStatus.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class TemplateUpdateStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TemplateUpdateStatus)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ActiveTemplate)) + { + writer.WritePropertyName("activeTemplate"u8); + writer.WriteObjectValue(ActiveTemplate, options); + } + if (Optional.IsDefined(DesiredTemplate)) + { + writer.WritePropertyName("desiredTemplate"u8); + writer.WriteObjectValue(DesiredTemplate, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TemplateUpdateStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TemplateUpdateStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTemplateUpdateStatus(document.RootElement, options); + } + + internal static TemplateUpdateStatus DeserializeTemplateUpdateStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TemplateStatus activeTemplate = default; + TemplateStatus desiredTemplate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("activeTemplate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeTemplate = TemplateStatus.DeserializeTemplateStatus(property.Value, options); + continue; + } + if (property.NameEquals("desiredTemplate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + desiredTemplate = TemplateStatus.DeserializeTemplateStatus(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TemplateUpdateStatus(activeTemplate, desiredTemplate, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActiveTemplate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" activeTemplate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActiveTemplate)) + { + builder.Append(" activeTemplate: "); + BicepSerializationHelpers.AppendChildObject(builder, ActiveTemplate, options, 2, false, " activeTemplate: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DesiredTemplate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" desiredTemplate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DesiredTemplate)) + { + builder.Append(" desiredTemplate: "); + BicepSerializationHelpers.AppendChildObject(builder, DesiredTemplate, options, 2, false, " desiredTemplate: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(TemplateUpdateStatus)} does not support writing '{options.Format}' format."); + } + } + + TemplateUpdateStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTemplateUpdateStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TemplateUpdateStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateUpdateStatus.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateUpdateStatus.cs new file mode 100644 index 000000000000..eb7868550924 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TemplateUpdateStatus.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The TemplateUpdateStatus. + public partial class TemplateUpdateStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal TemplateUpdateStatus() + { + } + + /// Initializes a new instance of . + /// The status of the current active template. + /// The status of the desired template during session pool update. + /// Keeps track of any properties unknown to the library. + internal TemplateUpdateStatus(TemplateStatus activeTemplate, TemplateStatus desiredTemplate, IDictionary serializedAdditionalRawData) + { + ActiveTemplate = activeTemplate; + DesiredTemplate = desiredTemplate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the current active template. + [WirePath("activeTemplate")] + public TemplateStatus ActiveTemplate { get; } + /// The status of the desired template during session pool update. + [WirePath("desiredTemplate")] + public TemplateStatus DesiredTemplate { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TimeoutPolicy.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TimeoutPolicy.Serialization.cs new file mode 100644 index 000000000000..818238f750f2 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TimeoutPolicy.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class TimeoutPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TimeoutPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ResponseTimeoutInSeconds)) + { + writer.WritePropertyName("responseTimeoutInSeconds"u8); + writer.WriteNumberValue(ResponseTimeoutInSeconds.Value); + } + if (Optional.IsDefined(ConnectionTimeoutInSeconds)) + { + writer.WritePropertyName("connectionTimeoutInSeconds"u8); + writer.WriteNumberValue(ConnectionTimeoutInSeconds.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TimeoutPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TimeoutPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTimeoutPolicy(document.RootElement, options); + } + + internal static TimeoutPolicy DeserializeTimeoutPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? responseTimeoutInSeconds = default; + int? connectionTimeoutInSeconds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("responseTimeoutInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + responseTimeoutInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("connectionTimeoutInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionTimeoutInSeconds = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TimeoutPolicy(responseTimeoutInSeconds, connectionTimeoutInSeconds, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResponseTimeoutInSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responseTimeoutInSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResponseTimeoutInSeconds)) + { + builder.Append(" responseTimeoutInSeconds: "); + builder.AppendLine($"{ResponseTimeoutInSeconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionTimeoutInSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionTimeoutInSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionTimeoutInSeconds)) + { + builder.Append(" connectionTimeoutInSeconds: "); + builder.AppendLine($"{ConnectionTimeoutInSeconds.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(TimeoutPolicy)} does not support writing '{options.Format}' format."); + } + } + + TimeoutPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTimeoutPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TimeoutPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TimeoutPolicy.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TimeoutPolicy.cs new file mode 100644 index 000000000000..77c84c059b87 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TimeoutPolicy.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Policy to set request timeouts. + public partial class TimeoutPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TimeoutPolicy() + { + } + + /// Initializes a new instance of . + /// Timeout, in seconds, for a request to respond. + /// Timeout, in seconds, for a request to initiate a connection. + /// Keeps track of any properties unknown to the library. + internal TimeoutPolicy(int? responseTimeoutInSeconds, int? connectionTimeoutInSeconds, IDictionary serializedAdditionalRawData) + { + ResponseTimeoutInSeconds = responseTimeoutInSeconds; + ConnectionTimeoutInSeconds = connectionTimeoutInSeconds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Timeout, in seconds, for a request to respond. + [WirePath("responseTimeoutInSeconds")] + public int? ResponseTimeoutInSeconds { get; set; } + /// Timeout, in seconds, for a request to initiate a connection. + [WirePath("connectionTimeoutInSeconds")] + public int? ConnectionTimeoutInSeconds { get; set; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TracesConfiguration.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TracesConfiguration.Serialization.cs new file mode 100644 index 000000000000..84d9cc07f19b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TracesConfiguration.Serialization.cs @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class TracesConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IncludeDapr)) + { + writer.WritePropertyName("includeDapr"u8); + writer.WriteBooleanValue(IncludeDapr.Value); + } + if (Optional.IsCollectionDefined(Destinations)) + { + writer.WritePropertyName("destinations"u8); + writer.WriteStartArray(); + foreach (var item in Destinations) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TracesConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTracesConfiguration(document.RootElement, options); + } + + internal static TracesConfiguration DeserializeTracesConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? includeDapr = default; + IList destinations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("includeDapr"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + includeDapr = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("destinations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + destinations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TracesConfiguration(includeDapr, destinations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IncludeDapr), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" includeDapr: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IncludeDapr)) + { + builder.Append(" includeDapr: "); + var boolValue = IncludeDapr.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Destinations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" destinations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Destinations)) + { + if (Destinations.Any()) + { + builder.Append(" destinations: "); + builder.AppendLine("["); + foreach (var item in Destinations) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(TracesConfiguration)} does not support writing '{options.Format}' format."); + } + } + + TracesConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTracesConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TracesConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TracesConfiguration.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TracesConfiguration.cs new file mode 100644 index 000000000000..11109e680256 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/TracesConfiguration.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// Configuration of Open Telemetry traces. + public partial class TracesConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TracesConfiguration() + { + Destinations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Boolean indicating if including dapr traces. + /// Open telemetry traces destinations. + /// Keeps track of any properties unknown to the library. + internal TracesConfiguration(bool? includeDapr, IList destinations, IDictionary serializedAdditionalRawData) + { + IncludeDapr = includeDapr; + Destinations = destinations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Boolean indicating if including dapr traces. + [WirePath("includeDapr")] + public bool? IncludeDapr { get; set; } + /// Open telemetry traces destinations. + [WirePath("destinations")] + public IList Destinations { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowArtifacts.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowArtifacts.Serialization.cs new file mode 100644 index 000000000000..793a6a5c17b7 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowArtifacts.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppContainers.Models +{ + public partial class WorkflowArtifacts : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AppSettings)) + { + writer.WritePropertyName("appSettings"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(AppSettings); +#else + using (JsonDocument document = JsonDocument.Parse(AppSettings, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Files)) + { + writer.WritePropertyName("files"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Files); +#else + using (JsonDocument document = JsonDocument.Parse(Files, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(FilesToDelete)) + { + writer.WritePropertyName("filesToDelete"u8); + writer.WriteStartArray(); + foreach (var item in FilesToDelete) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + WorkflowArtifacts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowArtifacts(document.RootElement, options); + } + + internal static WorkflowArtifacts DeserializeWorkflowArtifacts(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData appSettings = default; + BinaryData files = default; + IList filesToDelete = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appSettings = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + files = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("filesToDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + filesToDelete = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowArtifacts(appSettings, files, filesToDelete ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); + default: + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support writing '{options.Format}' format."); + } + } + + WorkflowArtifacts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWorkflowArtifacts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowArtifacts.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowArtifacts.cs new file mode 100644 index 000000000000..6b7f70d3f33b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowArtifacts.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppContainers.Models +{ + /// The workflow filter. + public partial class WorkflowArtifacts + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowArtifacts() + { + FilesToDelete = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Application settings of the workflow. + /// Files of the app. + /// Files of the app to delete. + /// Keeps track of any properties unknown to the library. + internal WorkflowArtifacts(BinaryData appSettings, BinaryData files, IList filesToDelete, IDictionary serializedAdditionalRawData) + { + AppSettings = appSettings; + Files = files; + FilesToDelete = filesToDelete; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Application settings of the workflow. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("appSettings")] + public BinaryData AppSettings { get; set; } + /// + /// Files of the app. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("files")] + public BinaryData Files { get; set; } + /// Files of the app to delete. + [WirePath("filesToDelete")] + public IList FilesToDelete { get; } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs index fab809b58372..e57c3834822c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink.AbsoluteUri); + writer.WriteStringValue(NextLink); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -86,7 +86,7 @@ internal static WorkflowEnvelopeCollection DeserializeWorkflowEnvelopeCollection return null; } IReadOnlyList value = default; - Uri nextLink = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -103,11 +103,7 @@ internal static WorkflowEnvelopeCollection DeserializeWorkflowEnvelopeCollection } if (property.NameEquals("nextLink"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = new Uri(property.Value.GetString()); + nextLink = property.Value.GetString(); continue; } if (options.Format != "W") @@ -164,7 +160,15 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.cs index bc75b2ff4134..53a1b2c89883 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowEnvelopeCollection.cs @@ -60,7 +60,7 @@ internal WorkflowEnvelopeCollection(IEnumerable va /// Collection of resources. /// Link to next page of resources. /// Keeps track of any properties unknown to the library. - internal WorkflowEnvelopeCollection(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + internal WorkflowEnvelopeCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -75,6 +75,6 @@ internal WorkflowEnvelopeCollection() /// Collection of resources. public IReadOnlyList Value { get; } /// Link to next page of resources. - public Uri NextLink { get; } + public string NextLink { get; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowErrorEntity.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowErrorEntity.Serialization.cs deleted file mode 100644 index 75a27e6dd00c..000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowErrorEntity.Serialization.cs +++ /dev/null @@ -1,473 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.AppContainers.Models -{ - public partial class WorkflowErrorEntity : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(WorkflowErrorEntity)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ExtendedCode)) - { - writer.WritePropertyName("extendedCode"u8); - writer.WriteStringValue(ExtendedCode); - } - if (Optional.IsDefined(MessageTemplate)) - { - writer.WritePropertyName("messageTemplate"u8); - writer.WriteStringValue(MessageTemplate); - } - if (Optional.IsCollectionDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStartArray(); - foreach (var item in Parameters) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(InnerErrors)) - { - writer.WritePropertyName("innerErrors"u8); - writer.WriteStartArray(); - foreach (var item in InnerErrors) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Details)) - { - writer.WritePropertyName("details"u8); - writer.WriteStartArray(); - foreach (var item in Details) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Code)) - { - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - } - if (Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - WorkflowErrorEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(WorkflowErrorEntity)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeWorkflowErrorEntity(document.RootElement, options); - } - - internal static WorkflowErrorEntity DeserializeWorkflowErrorEntity(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string extendedCode = default; - string messageTemplate = default; - IList parameters = default; - IList innerErrors = default; - IList details = default; - string target = default; - string code = default; - string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("extendedCode"u8)) - { - extendedCode = property.Value.GetString(); - continue; - } - if (property.NameEquals("messageTemplate"u8)) - { - messageTemplate = property.Value.GetString(); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - parameters = array; - continue; - } - if (property.NameEquals("innerErrors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DeserializeWorkflowErrorEntity(item, options)); - } - innerErrors = array; - continue; - } - if (property.NameEquals("details"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DeserializeWorkflowErrorEntity(item, options)); - } - details = array; - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new WorkflowErrorEntity( - extendedCode, - messageTemplate, - parameters ?? new ChangeTrackingList(), - innerErrors ?? new ChangeTrackingList(), - details ?? new ChangeTrackingList(), - target, - code, - message, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtendedCode), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" extendedCode: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ExtendedCode)) - { - builder.Append(" extendedCode: "); - if (ExtendedCode.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{ExtendedCode}'''"); - } - else - { - builder.AppendLine($"'{ExtendedCode}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MessageTemplate), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" messageTemplate: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(MessageTemplate)) - { - builder.Append(" messageTemplate: "); - if (MessageTemplate.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{MessageTemplate}'''"); - } - else - { - builder.AppendLine($"'{MessageTemplate}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" parameters: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Parameters)) - { - if (Parameters.Any()) - { - builder.Append(" parameters: "); - builder.AppendLine("["); - foreach (var item in Parameters) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InnerErrors), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" innerErrors: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(InnerErrors)) - { - if (InnerErrors.Any()) - { - builder.Append(" innerErrors: "); - builder.AppendLine("["); - foreach (var item in InnerErrors) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " innerErrors: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Details), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" details: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Details)) - { - if (Details.Any()) - { - builder.Append(" details: "); - builder.AppendLine("["); - foreach (var item in Details) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " details: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Target), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" target: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Target)) - { - builder.Append(" target: "); - if (Target.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Target}'''"); - } - else - { - builder.AppendLine($"'{Target}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" code: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Code)) - { - builder.Append(" code: "); - if (Code.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Code}'''"); - } - else - { - builder.AppendLine($"'{Code}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" message: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Message)) - { - builder.Append(" message: "); - if (Message.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Message}'''"); - } - else - { - builder.AppendLine($"'{Message}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerAppContainersContext.Default); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(WorkflowErrorEntity)} does not support writing '{options.Format}' format."); - } - } - - WorkflowErrorEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeWorkflowErrorEntity(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(WorkflowErrorEntity)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowErrorEntity.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowErrorEntity.cs deleted file mode 100644 index 61f0ca82c0a8..000000000000 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/WorkflowErrorEntity.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.AppContainers.Models -{ - /// Body of the error response returned from the API. - public partial class WorkflowErrorEntity - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public WorkflowErrorEntity() - { - Parameters = new ChangeTrackingList(); - InnerErrors = new ChangeTrackingList(); - Details = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Type of error. - /// Message template. - /// Parameters for the template. - /// Inner errors. - /// Error Details. - /// The error target. - /// Basic error code. - /// Any details of the error. - /// Keeps track of any properties unknown to the library. - internal WorkflowErrorEntity(string extendedCode, string messageTemplate, IList parameters, IList innerErrors, IList details, string target, string code, string message, IDictionary serializedAdditionalRawData) - { - ExtendedCode = extendedCode; - MessageTemplate = messageTemplate; - Parameters = parameters; - InnerErrors = innerErrors; - Details = details; - Target = target; - Code = code; - Message = message; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Type of error. - [WirePath("extendedCode")] - public string ExtendedCode { get; set; } - /// Message template. - [WirePath("messageTemplate")] - public string MessageTemplate { get; set; } - /// Parameters for the template. - [WirePath("parameters")] - public IList Parameters { get; } - /// Inner errors. - [WirePath("innerErrors")] - public IList InnerErrors { get; } - /// Error Details. - [WirePath("details")] - public IList Details { get; } - /// The error target. - [WirePath("target")] - public string Target { get; set; } - /// Basic error code. - [WirePath("code")] - public string Code { get; set; } - /// Any details of the error. - [WirePath("message")] - public string Message { get; set; } - } -} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AppResiliencyRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AppResiliencyRestOperations.cs new file mode 100644 index 000000000000..9cdbd86c0b41 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AppResiliencyRestOperations.cs @@ -0,0 +1,631 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class AppResiliencyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AppResiliencyRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AppResiliencyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The resiliency policy to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, appName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AppResiliencyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AppResiliencyData.DeserializeAppResiliencyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The resiliency policy to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, appName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AppResiliencyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AppResiliencyData.DeserializeAppResiliencyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The resiliency policy to update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, appName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppResiliencyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AppResiliencyData.DeserializeAppResiliencyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The resiliency policy to update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string appName, string name, AppResiliencyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, appName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppResiliencyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AppResiliencyData.DeserializeAppResiliencyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string appName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string appName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string appName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, appName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string appName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, appName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string appName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string appName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string appName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, appName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppResiliencyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AppResiliencyData.DeserializeAppResiliencyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AppResiliencyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get container app resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the resiliency policy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string appName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, appName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppResiliencyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AppResiliencyData.DeserializeAppResiliencyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AppResiliencyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string appName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string appName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(appName, true); + uri.AppendPath("/resiliencyPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List container app resiliency policies. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, appName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.AppResiliencyCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = Models.AppResiliencyCollection.DeserializeAppResiliencyCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List container app resiliency policies. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, appName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.AppResiliencyCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = Models.AppResiliencyCollection.DeserializeAppResiliencyCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string appName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string appName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List container app resiliency policies. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, appName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.AppResiliencyCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = Models.AppResiliencyCollection.DeserializeAppResiliencyCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List container app resiliency policies. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string appName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(appName, nameof(appName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, appName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.AppResiliencyCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = Models.AppResiliencyCollection.DeserializeAppResiliencyCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs index 1b4f5c0e58d7..cbe5a257464b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/AvailableWorkloadProfilesRestOperations.cs @@ -32,7 +32,7 @@ public AvailableWorkloadProfilesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -69,7 +69,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat } /// Get all available workload profiles for a location. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of Azure region. /// The cancellation token to use. /// is null. @@ -95,7 +95,7 @@ public async Task> GetAsync(string } /// Get all available workload profiles for a location. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of Azure region. /// The cancellation token to use. /// is null. @@ -144,7 +144,7 @@ internal HttpMessage CreateGetNextPageRequest(string nextLink, string subscripti /// Get all available workload profiles for a location. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of Azure region. /// The cancellation token to use. /// or is null. @@ -172,7 +172,7 @@ public async Task> GetNextPageAsyn /// Get all available workload profiles for a location. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of Azure region. /// The cancellation token to use. /// or is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs index f80752f5cc7b..d2368fc6d3dc 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BillingMetersRestOperations.cs @@ -32,7 +32,7 @@ public BillingMetersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -69,7 +69,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat } /// Get all billingMeters for a location. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of Azure region. /// The cancellation token to use. /// is null. @@ -95,7 +95,7 @@ public async Task> GetAsync(string subscription } /// Get all billingMeters for a location. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of Azure region. /// The cancellation token to use. /// is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildAuthTokenRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildAuthTokenRestOperations.cs new file mode 100644 index 000000000000..7dc23629421e --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildAuthTokenRestOperations.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class BuildAuthTokenRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildAuthTokenRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public BuildAuthTokenRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string builderName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/listAuthToken", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string builderName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendPath("/listAuthToken", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the token used to connect to the endpoint where source code can be uploaded for a build. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string builderName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, builderName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildToken value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuildToken.DeserializeBuildToken(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the token used to connect to the endpoint where source code can be uploaded for a build. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string builderName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, builderName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildToken value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuildToken.DeserializeBuildToken(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildersRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildersRestOperations.cs new file mode 100644 index 000000000000..d163358f2e8b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildersRestOperations.cs @@ -0,0 +1,723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class BuildersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public BuildersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.App/builders", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.App/builders", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BuilderResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BuilderResource resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BuilderResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BuilderResource resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string builderName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string builderName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, builderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuilderResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuilderResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, builderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuilderResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuilderResourceData.DeserializeBuilderResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuilderResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string builderName, BuilderResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string builderName, BuilderResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, builderName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string builderName, BuilderResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, builderName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string builderName, BuilderResourcePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string builderName, BuilderResourcePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string builderName, BuilderResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, builderName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string builderName, BuilderResourcePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, builderName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string builderName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string builderName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, builderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, builderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BuilderResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BuilderResource resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BuilderResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BuilderResource resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuilderCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuilderCollection.DeserializeBuilderCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildsByBuilderResourceRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildsByBuilderResourceRestOperations.cs new file mode 100644 index 000000000000..5df5cf31147f --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildsByBuilderResourceRestOperations.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class BuildsByBuilderResourceRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildsByBuilderResourceRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public BuildsByBuilderResourceRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string builderName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string builderName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BuildResource resources by BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, builderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BuildResource resources by BuilderResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, builderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string builderName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string builderName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List BuildResource resources by BuilderResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, builderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List BuildResource resources by BuilderResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string builderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, builderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuildCollection.DeserializeBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildsRestOperations.cs new file mode 100644 index 000000000000..154b7735bbbe --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/BuildsRestOperations.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class BuildsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BuildsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public BuildsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string builderName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string builderName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a BuildResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string builderName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, builderName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BuildResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BuildResourceData.DeserializeBuildResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a BuildResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string builderName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, builderName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BuildResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BuildResourceData.DeserializeBuildResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BuildResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string builderName, string buildName, BuildResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string builderName, string buildName, BuildResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a BuildResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// Resource create or update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string builderName, string buildName, BuildResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, builderName, buildName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a BuildResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// Resource create or update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string builderName, string buildName, BuildResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, builderName, buildName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string builderName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string builderName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/builders/", false); + uri.AppendPath(builderName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a BuildResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string builderName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, builderName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a BuildResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the builder. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string builderName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(builderName, nameof(builderName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, builderName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs index 9dd99dcd7bb3..14c6b9131be6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -32,7 +32,7 @@ public CertificatesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get the Certificates in a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string subscription } /// Get the Certificates in a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -202,7 +202,7 @@ public async Task> GetAsync(string subscri } /// Get the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update a Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -310,7 +310,7 @@ public async Task> CreateOrUpdateAsync(str } /// Create or Update a Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -381,7 +381,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -408,7 +408,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -477,7 +477,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a certificate. Currently only patching of tags is supported. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -510,7 +510,7 @@ public async Task> UpdateAsync(string subs } /// Patches a certificate. Currently only patching of tags is supported. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Certificate. @@ -566,7 +566,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the Certificates in a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -597,7 +597,7 @@ public async Task> ListNextPageAsync(string next /// Get the Certificates in a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs index c0163c95b185..e423e5b8df4c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsCertificatesRestOperations.cs @@ -32,7 +32,7 @@ public ConnectedEnvironmentsCertificatesRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get the Certificates in a given connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string subscription } /// Get the Certificates in a given connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -202,7 +202,7 @@ public async Task> GetAsync(string subscri } /// Get the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update a Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -306,7 +306,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or Update a Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -373,7 +373,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -400,7 +400,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -469,7 +469,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a certificate. Currently only patching of tags is supported. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -498,7 +498,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Patches a certificate. Currently only patching of tags is supported. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// Name of the Certificate. @@ -550,7 +550,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the Certificates in a given connected environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// The cancellation token to use. @@ -581,7 +581,7 @@ public async Task> ListNextPageAsync(string next /// Get the Certificates in a given connected environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Connected Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs index 18d61f0116a2..2e9a4789bf6f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsDaprComponentsRestOperations.cs @@ -32,7 +32,7 @@ public ConnectedEnvironmentsDaprComponentsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,13 +73,13 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get the Dapr Components for a connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -91,9 +91,9 @@ public async Task> ListAsync(string subscript { case 200: { - DaprComponentsCollection value = default; + ConnectedEnvironmentDaprComponentsCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DaprComponentsCollection.DeserializeDaprComponentsCollection(document.RootElement); + value = ConnectedEnvironmentDaprComponentsCollection.DeserializeConnectedEnvironmentDaprComponentsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -102,13 +102,13 @@ public async Task> ListAsync(string subscript } /// Get the Dapr Components for a connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -120,9 +120,9 @@ public Response List(string subscriptionId, string res { case 200: { - DaprComponentsCollection value = default; + ConnectedEnvironmentDaprComponentsCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DaprComponentsCollection.DeserializeDaprComponentsCollection(document.RootElement); + value = ConnectedEnvironmentDaprComponentsCollection.DeserializeConnectedEnvironmentDaprComponentsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -169,14 +169,14 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -189,27 +189,27 @@ public async Task> GetAsync(string subsc { case 200: { - ContainerAppDaprComponentData value = default; + ConnectedEnvironmentDaprComponentData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerAppDaprComponentData.DeserializeContainerAppDaprComponentData(document.RootElement); + value = ConnectedEnvironmentDaprComponentData.DeserializeConnectedEnvironmentDaprComponentData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ContainerAppDaprComponentData)null, message.Response); + return Response.FromValue((ConnectedEnvironmentDaprComponentData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// Get a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -222,19 +222,19 @@ public Response Get(string subscriptionId, string { case 200: { - ContainerAppDaprComponentData value = default; + ConnectedEnvironmentDaprComponentData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerAppDaprComponentData.DeserializeContainerAppDaprComponentData(document.RootElement); + value = ConnectedEnvironmentDaprComponentData.DeserializeConnectedEnvironmentDaprComponentData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ContainerAppDaprComponentData)null, message.Response); + return Response.FromValue((ConnectedEnvironmentDaprComponentData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ContainerAppDaprComponentData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ConnectedEnvironmentDaprComponentData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,7 +250,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ContainerAppDaprComponentData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ConnectedEnvironmentDaprComponentData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Dapr Component in a connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. @@ -285,7 +285,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ContainerAppDaprComponentData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ConnectedEnvironmentDaprComponentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -306,7 +306,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a Dapr Component in a connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. @@ -314,7 +314,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ContainerAppDaprComponentData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string connectedEnvironmentName, string componentName, ConnectedEnvironmentDaprComponentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -373,7 +373,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Dapr Component from a connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. @@ -400,7 +400,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Dapr Component from a connected environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. @@ -467,7 +467,7 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// List secrets for a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. @@ -498,7 +498,7 @@ public async Task> ListSecretsAsync(string subsc } /// List secrets for a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// Name of the Dapr Component. @@ -552,13 +552,13 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the Dapr Components for a connected environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -571,9 +571,9 @@ public async Task> ListNextPageAsync(string n { case 200: { - DaprComponentsCollection value = default; + ConnectedEnvironmentDaprComponentsCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DaprComponentsCollection.DeserializeDaprComponentsCollection(document.RootElement); + value = ConnectedEnvironmentDaprComponentsCollection.DeserializeConnectedEnvironmentDaprComponentsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -583,13 +583,13 @@ public async Task> ListNextPageAsync(string n /// Get the Dapr Components for a connected environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connected environment. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string connectedEnvironmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -602,9 +602,9 @@ public Response ListNextPage(string nextLink, string s { case 200: { - DaprComponentsCollection value = default; + ConnectedEnvironmentDaprComponentsCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DaprComponentsCollection.DeserializeDaprComponentsCollection(document.RootElement); + value = ConnectedEnvironmentDaprComponentsCollection.DeserializeConnectedEnvironmentDaprComponentsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs index 5230af2ae6ee..034972b28054 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsRestOperations.cs @@ -32,7 +32,7 @@ public ConnectedEnvironmentsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Get all connectedEnvironments for a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ public async Task> ListBySubscriptionAs } /// Get all connectedEnvironments for a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Get all connectedEnvironments in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -174,7 +174,7 @@ public async Task> ListByResourceGroupA } /// Get all connectedEnvironments in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -235,7 +235,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the properties of an connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// The cancellation token to use. @@ -266,7 +266,7 @@ public async Task> GetAsync(strin } /// Get the properties of an connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// The cancellation token to use. @@ -335,7 +335,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// Configuration details of the connectedEnvironment. @@ -362,7 +362,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates an connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// Configuration details of the connectedEnvironment. @@ -423,7 +423,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete an connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// The cancellation token to use. @@ -449,7 +449,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete an connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// The cancellation token to use. @@ -513,7 +513,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a Managed Environment. Only patching of tags is supported currently. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// Configuration details of the connectedEnvironment. @@ -544,7 +544,7 @@ public async Task> UpdateAsync(st } /// Patches a Managed Environment. Only patching of tags is supported currently. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the connectedEnvironment. /// Configuration details of the connectedEnvironment. @@ -615,7 +615,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, s } /// Checks if resource connectedEnvironmentName is available. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The check connectedEnvironmentName availability request. @@ -646,7 +646,7 @@ public async Task> CheckNameAvailab } /// Checks if resource connectedEnvironmentName is available. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The check connectedEnvironmentName availability request. @@ -700,7 +700,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Get all connectedEnvironments for a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -727,7 +727,7 @@ public async Task> ListBySubscriptionNe /// Get all connectedEnvironments for a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -776,7 +776,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Get all connectedEnvironments in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -805,7 +805,7 @@ public async Task> ListByResourceGroupN /// Get all connectedEnvironments in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs index d81ba488bf47..3ca553031189 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ConnectedEnvironmentsStoragesRestOperations.cs @@ -32,7 +32,7 @@ public ConnectedEnvironmentsStoragesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get all storages for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(st } /// Get all storages for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get storage for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -202,7 +202,7 @@ public async Task> GetAsyn } /// Get storage for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update storage for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -306,7 +306,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update storage for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -373,7 +373,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete storage for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -400,7 +400,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete storage for a connectedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAPIRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAPIRestOperations.cs index 218ad7a142fd..d24c6005d605 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAPIRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAPIRestOperations.cs @@ -31,7 +31,7 @@ public ContainerAppsAPIRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -74,7 +74,7 @@ internal HttpMessage CreateJobExecutionRequest(string subscriptionId, string res } /// Get details of a single job execution. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Job execution name. @@ -107,7 +107,7 @@ public async Task> JobExecutionAsync(stri } /// Get details of a single job execution. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Job execution name. @@ -168,7 +168,7 @@ internal HttpMessage CreateGetCustomDomainVerificationIdRequest(string subscript } /// Get the verification id of a subscription used for verifying custom domains. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -193,7 +193,7 @@ public async Task> GetCustomDomainVerificationIdAsync(string su } /// Get the verification id of a subscription used for verifying custom domains. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs index daa79b308bb4..852ba6e42185 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsAuthConfigsRestOperations.cs @@ -32,7 +32,7 @@ public ContainerAppsAuthConfigsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListByContainerAppRequest(string subscriptionId, stri } /// Get the Container App AuthConfigs in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListByContainerAppAsync(string } /// Get the Container App AuthConfigs in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a AuthConfig of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App AuthConfig. @@ -202,7 +202,7 @@ public async Task> GetAsync(string subscrip } /// Get a AuthConfig of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App AuthConfig. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update the AuthConfig for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App AuthConfig. @@ -310,7 +310,7 @@ public async Task> CreateOrUpdateAsync(stri } /// Create or update the AuthConfig for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App AuthConfig. @@ -381,7 +381,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Container App AuthConfig. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App AuthConfig. @@ -408,7 +408,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Container App AuthConfig. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App AuthConfig. @@ -458,7 +458,7 @@ internal HttpMessage CreateListByContainerAppNextPageRequest(string nextLink, st /// Get the Container App AuthConfigs in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -489,7 +489,7 @@ public async Task> ListByContainerAppNextPageAsyn /// Get the Container App AuthConfigs in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsBuildsByContainerAppRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsBuildsByContainerAppRestOperations.cs new file mode 100644 index 000000000000..ba364e0ca0f0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsBuildsByContainerAppRestOperations.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class ContainerAppsBuildsByContainerAppRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ContainerAppsBuildsByContainerAppRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ContainerAppsBuildsByContainerAppRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string containerAppName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string containerAppName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/builds", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Container Apps Build resources by Container App. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, containerAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsBuildCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerAppsBuildCollection.DeserializeContainerAppsBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Container Apps Build resources by Container App. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, containerAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsBuildCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerAppsBuildCollection.DeserializeContainerAppsBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Container Apps Build resources by Container App. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, containerAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsBuildCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerAppsBuildCollection.DeserializeContainerAppsBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Container Apps Build resources by Container App. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, containerAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsBuildCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerAppsBuildCollection.DeserializeContainerAppsBuildCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsBuildsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsBuildsRestOperations.cs new file mode 100644 index 000000000000..83715a0d0a4c --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsBuildsRestOperations.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class ContainerAppsBuildsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ContainerAppsBuildsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ContainerAppsBuildsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string containerAppName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Container Apps Build resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string containerAppName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, containerAppName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsBuildResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerAppsBuildResourceData.DeserializeContainerAppsBuildResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppsBuildResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Container Apps Build resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string containerAppName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, containerAppName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsBuildResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerAppsBuildResourceData.DeserializeContainerAppsBuildResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppsBuildResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string buildName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string containerAppName, string buildName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(buildName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Container Apps Build resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string containerAppName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, buildName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Container Apps Build resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Build is associated. + /// The name of a build. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string containerAppName, string buildName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(buildName, nameof(buildName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, buildName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs index d1c03b069cbe..d6a436726520 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsDiagnosticsRestOperations.cs @@ -32,7 +32,7 @@ public ContainerAppsDiagnosticsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListDetectorsRequest(string subscriptionId, string re } /// Get the list of diagnostics for a given Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which detector info is needed. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListDetectorsAsync(string sub } /// Get the list of diagnostics for a given Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which detector info is needed. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetDetectorRequest(string subscriptionId, string reso } /// Get a diagnostics result of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Detector. @@ -202,7 +202,7 @@ public async Task> GetDetectorAsync(string } /// Get a diagnostics result of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Detector. @@ -279,7 +279,7 @@ internal HttpMessage CreateListRevisionsRequest(string subscriptionId, string re } /// Get the Revisions for a given Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. @@ -309,7 +309,7 @@ public async Task> ListRevisionsAsync(string subscr } /// Get the Revisions for a given Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. @@ -377,7 +377,7 @@ internal HttpMessage CreateGetRevisionRequest(string subscriptionId, string reso } /// Get a revision of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -410,7 +410,7 @@ public async Task> GetRevisionAsync(string su } /// Get a revision of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -479,7 +479,7 @@ internal HttpMessage CreateGetRootRequest(string subscriptionId, string resource } /// Get the properties of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -510,7 +510,7 @@ public async Task> GetRootAsync(string subscriptionId } /// Get the properties of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -564,7 +564,7 @@ internal HttpMessage CreateListDetectorsNextPageRequest(string nextLink, string /// Get the list of diagnostics for a given Container App. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which detector info is needed. /// The cancellation token to use. @@ -595,7 +595,7 @@ public async Task> ListDetectorsNextPageAsync(st /// Get the list of diagnostics for a given Container App. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which detector info is needed. /// The cancellation token to use. @@ -648,7 +648,7 @@ internal HttpMessage CreateListRevisionsNextPageRequest(string nextLink, string /// Get the Revisions for a given Container App. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. @@ -680,7 +680,7 @@ public async Task> ListRevisionsNextPageAsync(strin /// Get the Revisions for a given Container App. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsLabelHistoryRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsLabelHistoryRestOperations.cs new file mode 100644 index 000000000000..bf59d6a3934d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsLabelHistoryRestOperations.cs @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class ContainerAppsLabelHistoryRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ContainerAppsLabelHistoryRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ContainerAppsLabelHistoryRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListLabelHistoryRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/labelHistory", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListLabelHistoryRequest(string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/labelHistory", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Label History for a given Container App. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListLabelHistoryAsync(string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListLabelHistoryRequest(subscriptionId, resourceGroupName, containerAppName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.LabelHistoryCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = Models.LabelHistoryCollection.DeserializeLabelHistoryCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Label History for a given Container App. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListLabelHistory(string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListLabelHistoryRequest(subscriptionId, resourceGroupName, containerAppName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.LabelHistoryCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = Models.LabelHistoryCollection.DeserializeLabelHistoryCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLabelHistoryRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string labelName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/labelHistory/", false); + uri.AppendPath(labelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLabelHistoryRequest(string subscriptionId, string resourceGroupName, string containerAppName, string labelName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/labelHistory/", false); + uri.AppendPath(labelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the history of a label. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Container App label. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetLabelHistoryAsync(string subscriptionId, string resourceGroupName, string containerAppName, string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var message = CreateGetLabelHistoryRequest(subscriptionId, resourceGroupName, containerAppName, labelName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LabelHistoryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = LabelHistoryData.DeserializeLabelHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((LabelHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the history of a label. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Container App label. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetLabelHistory(string subscriptionId, string resourceGroupName, string containerAppName, string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var message = CreateGetLabelHistoryRequest(subscriptionId, resourceGroupName, containerAppName, labelName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LabelHistoryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = LabelHistoryData.DeserializeLabelHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((LabelHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteLabelHistoryRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string labelName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/labelHistory/", false); + uri.AppendPath(labelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteLabelHistoryRequest(string subscriptionId, string resourceGroupName, string containerAppName, string labelName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/labelHistory/", false); + uri.AppendPath(labelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the history of a label. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Container App label. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteLabelHistoryAsync(string subscriptionId, string resourceGroupName, string containerAppName, string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var message = CreateDeleteLabelHistoryRequest(subscriptionId, resourceGroupName, containerAppName, labelName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the history of a label. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Container App label. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteLabelHistory(string subscriptionId, string resourceGroupName, string containerAppName, string labelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(labelName, nameof(labelName)); + + using var message = CreateDeleteLabelHistoryRequest(subscriptionId, resourceGroupName, containerAppName, labelName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListLabelHistoryNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListLabelHistoryNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Label History for a given Container App. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListLabelHistoryNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListLabelHistoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, containerAppName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.LabelHistoryCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = Models.LabelHistoryCollection.DeserializeLabelHistoryCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Label History for a given Container App. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListLabelHistoryNextPage(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListLabelHistoryNextPageRequest(nextLink, subscriptionId, resourceGroupName, containerAppName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.LabelHistoryCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = Models.LabelHistoryCollection.DeserializeLabelHistoryCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsPatchesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsPatchesRestOperations.cs new file mode 100644 index 000000000000..d340929f07c4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsPatchesRestOperations.cs @@ -0,0 +1,619 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class ContainerAppsPatchesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ContainerAppsPatchesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ContainerAppsPatchesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByContainerAppRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListByContainerAppRequest(string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Container Apps Patch resources by ContainerApp. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq 'Succeeded'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByContainerAppAsync(string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListByContainerAppRequest(subscriptionId, resourceGroupName, containerAppName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PatchCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PatchCollection.DeserializePatchCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Container Apps Patch resources by ContainerApp. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq 'Succeeded'. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByContainerApp(string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListByContainerAppRequest(subscriptionId, resourceGroupName, containerAppName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PatchCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PatchCollection.DeserializePatchCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get details for specific Container Apps Patch by patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, containerAppName, patchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsPatchResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerAppsPatchResourceData.DeserializeContainerAppsPatchResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppsPatchResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get details for specific Container Apps Patch by patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, containerAppName, patchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ContainerAppsPatchResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerAppsPatchResourceData.DeserializeContainerAppsPatchResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerAppsPatchResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete specific Container Apps Patch by patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, patchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete specific Container Apps Patch by patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, patchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateSkipConfigureRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, PatchSkipConfig patchSkipConfig) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendPath("/skipConfig", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateSkipConfigureRequest(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, PatchSkipConfig patchSkipConfig) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendPath("/skipConfig", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patchSkipConfig, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Configure the Container Apps Patch skip option by patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// Configure patcher to skip a patch or not. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task SkipConfigureAsync(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, PatchSkipConfig patchSkipConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + Argument.AssertNotNull(patchSkipConfig, nameof(patchSkipConfig)); + + using var message = CreateSkipConfigureRequest(subscriptionId, resourceGroupName, containerAppName, patchName, patchSkipConfig); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Configure the Container Apps Patch skip option by patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// Configure patcher to skip a patch or not. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response SkipConfigure(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, PatchSkipConfig patchSkipConfig, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + Argument.AssertNotNull(patchSkipConfig, nameof(patchSkipConfig)); + + using var message = CreateSkipConfigureRequest(subscriptionId, resourceGroupName, containerAppName, patchName, patchSkipConfig); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateApplyRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendPath("/apply", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateApplyRequest(string subscriptionId, string resourceGroupName, string containerAppName, string patchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/patches/", false); + uri.AppendPath(patchName, true); + uri.AppendPath("/apply", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Apply a Container Apps Patch resource with patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ApplyAsync(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var message = CreateApplyRequest(subscriptionId, resourceGroupName, containerAppName, patchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Apply a Container Apps Patch resource with patch name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The name of the patch. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Apply(string subscriptionId, string resourceGroupName, string containerAppName, string patchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(patchName, nameof(patchName)); + + using var message = CreateApplyRequest(subscriptionId, resourceGroupName, containerAppName, patchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByContainerAppNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByContainerAppNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Container Apps Patch resources by ContainerApp. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq 'Succeeded'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByContainerAppNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListByContainerAppNextPageRequest(nextLink, subscriptionId, resourceGroupName, containerAppName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PatchCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PatchCollection.DeserializePatchCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Container Apps Patch resources by ContainerApp. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App the Patch is associated. + /// The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq 'Succeeded'. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByContainerAppNextPage(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + + using var message = CreateListByContainerAppNextPageRequest(nextLink, subscriptionId, resourceGroupName, containerAppName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PatchCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PatchCollection.DeserializePatchCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs index 161c004ad674..4cb98e69a2ac 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRestOperations.cs @@ -32,7 +32,7 @@ public ContainerAppsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Get the Container Apps in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Get the Container Apps in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Get the Container Apps in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -174,7 +174,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Get the Container Apps in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -235,7 +235,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the properties of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -266,7 +266,7 @@ public async Task> GetAsync(string subscriptionId, st } /// Get the properties of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -335,7 +335,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Properties used to create a container app. @@ -362,7 +362,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Properties used to create a container app. @@ -423,7 +423,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -449,7 +449,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -513,7 +513,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a Container App using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Properties of a Container App that need to be updated. @@ -540,7 +540,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Patches a Container App using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Properties of a Container App that need to be updated. @@ -611,7 +611,7 @@ internal HttpMessage CreateListCustomHostNameAnalysisRequest(string subscription } /// Analyzes a custom hostname for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Custom hostname. @@ -641,7 +641,7 @@ public async Task> ListCustom } /// Analyzes a custom hostname for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Custom hostname. @@ -707,7 +707,7 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// List secrets for a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -736,7 +736,7 @@ public async Task> ListSecretsAsync(string subscript } /// List secrets for a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -801,7 +801,7 @@ internal HttpMessage CreateGetAuthTokenRequest(string subscriptionId, string res } /// Get auth token for a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -830,7 +830,7 @@ public async Task> GetAuthTokenAsync(string subs } /// Get auth token for a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -895,7 +895,7 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr } /// Start a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -920,7 +920,7 @@ public async Task StartAsync(string subscriptionId, string resourceGro } /// Start a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -981,7 +981,7 @@ internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGro } /// Stop a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -1006,7 +1006,7 @@ public async Task StopAsync(string subscriptionId, string resourceGrou } /// Stop a container app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -1054,7 +1054,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Get the Container Apps in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -1081,7 +1081,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Get the Container Apps in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -1130,7 +1130,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Get the Container Apps in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -1159,7 +1159,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Get the Container Apps in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs index 30d01540b1d8..391413adc104 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionReplicasRestOperations.cs @@ -32,7 +32,7 @@ public ContainerAppsRevisionReplicasRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,7 +79,7 @@ internal HttpMessage CreateGetReplicaRequest(string subscriptionId, string resou } /// Get a replica for a Container App Revision. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -114,7 +114,7 @@ public async Task> GetReplicaAsync(string subs } /// Get a replica for a Container App Revision. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -189,7 +189,7 @@ internal HttpMessage CreateListReplicasRequest(string subscriptionId, string res } /// List replicas for a Container App Revision. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -220,7 +220,7 @@ public async Task> ListReplicasAsync(string subscrip } /// List replicas for a Container App Revision. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs index 101c1b6d92b8..35fd91a5065d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsRevisionsRestOperations.cs @@ -32,7 +32,7 @@ public ContainerAppsRevisionsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListRevisionsRequest(string subscriptionId, string re } /// Get the Revisions for a given Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. @@ -111,7 +111,7 @@ public async Task> ListRevisionsAsync(string subscr } /// Get the Revisions for a given Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. @@ -179,7 +179,7 @@ internal HttpMessage CreateGetRevisionRequest(string subscriptionId, string reso } /// Get a revision of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -212,7 +212,7 @@ public async Task> GetRevisionAsync(string su } /// Get a revision of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -285,7 +285,7 @@ internal HttpMessage CreateActivateRevisionRequest(string subscriptionId, string } /// Activates a revision for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -311,7 +311,7 @@ public async Task ActivateRevisionAsync(string subscriptionId, string } /// Activates a revision for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -377,7 +377,7 @@ internal HttpMessage CreateDeactivateRevisionRequest(string subscriptionId, stri } /// Deactivates a revision for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -403,7 +403,7 @@ public async Task DeactivateRevisionAsync(string subscriptionId, strin } /// Deactivates a revision for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -469,7 +469,7 @@ internal HttpMessage CreateRestartRevisionRequest(string subscriptionId, string } /// Restarts a revision for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -495,7 +495,7 @@ public async Task RestartRevisionAsync(string subscriptionId, string r } /// Restarts a revision for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App Revision. @@ -544,7 +544,7 @@ internal HttpMessage CreateListRevisionsNextPageRequest(string nextLink, string /// Get the Revisions for a given Container App. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. @@ -576,7 +576,7 @@ public async Task> ListRevisionsNextPageAsync(strin /// Get the Revisions for a given Container App. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App for which Revisions are needed. /// The filter to apply on the operation. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSessionPoolsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSessionPoolsRestOperations.cs index d28e7108c190..a6ab4c936cf8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSessionPoolsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSessionPoolsRestOperations.cs @@ -32,7 +32,7 @@ public ContainerAppsSessionPoolsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Get the session pools in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Get the session pools in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Get the session pools in a given resource group of a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -174,7 +174,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Get the session pools in a given resource group of a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -235,7 +235,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the properties of a session pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// The cancellation token to use. @@ -266,7 +266,7 @@ public async Task> GetAsync(string subscriptionId, str } /// Get the properties of a session pool. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// The cancellation token to use. @@ -335,7 +335,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a session pool with the given properties. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// Properties used to create a session pool. @@ -362,7 +362,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a session pool with the given properties. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// Properties used to create a session pool. @@ -427,7 +427,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a session pool using JSON merge patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// Properties used to create a session pool. @@ -454,7 +454,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Patches a session pool using JSON merge patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// Properties used to create a session pool. @@ -515,7 +515,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete the session pool with the given name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// The cancellation token to use. @@ -540,7 +540,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete the session pool with the given name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the session pool. /// The cancellation token to use. @@ -564,6 +564,194 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } + internal RequestUriBuilder CreateFetchMcpServerCredentialsRequestUri(string subscriptionId, string resourceGroupName, string sessionPoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/sessionPools/", false); + uri.AppendPath(sessionPoolName, true); + uri.AppendPath("/fetchMcpServerCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateFetchMcpServerCredentialsRequest(string subscriptionId, string resourceGroupName, string sessionPoolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/sessionPools/", false); + uri.AppendPath(sessionPoolName, true); + uri.AppendPath("/fetchMcpServerCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Fetch the MCP server credentials of a session pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the session pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> FetchMcpServerCredentialsAsync(string subscriptionId, string resourceGroupName, string sessionPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sessionPoolName, nameof(sessionPoolName)); + + using var message = CreateFetchMcpServerCredentialsRequest(subscriptionId, resourceGroupName, sessionPoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + McpServerCredential value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = McpServerCredential.DeserializeMcpServerCredential(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Fetch the MCP server credentials of a session pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the session pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response FetchMcpServerCredentials(string subscriptionId, string resourceGroupName, string sessionPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sessionPoolName, nameof(sessionPoolName)); + + using var message = CreateFetchMcpServerCredentialsRequest(subscriptionId, resourceGroupName, sessionPoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + McpServerCredential value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = McpServerCredential.DeserializeMcpServerCredential(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRotateMcpServerCredentialsRequestUri(string subscriptionId, string resourceGroupName, string sessionPoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/sessionPools/", false); + uri.AppendPath(sessionPoolName, true); + uri.AppendPath("/rotateMcpServerCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRotateMcpServerCredentialsRequest(string subscriptionId, string resourceGroupName, string sessionPoolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/sessionPools/", false); + uri.AppendPath(sessionPoolName, true); + uri.AppendPath("/rotateMcpServerCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Rotate and fetch the rotated MCP server credentials of a session pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the session pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> RotateMcpServerCredentialsAsync(string subscriptionId, string resourceGroupName, string sessionPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sessionPoolName, nameof(sessionPoolName)); + + using var message = CreateRotateMcpServerCredentialsRequest(subscriptionId, resourceGroupName, sessionPoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + McpServerCredential value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = McpServerCredential.DeserializeMcpServerCredential(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Rotate and fetch the rotated MCP server credentials of a session pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the session pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RotateMcpServerCredentials(string subscriptionId, string resourceGroupName, string sessionPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sessionPoolName, nameof(sessionPoolName)); + + using var message = CreateRotateMcpServerCredentialsRequest(subscriptionId, resourceGroupName, sessionPoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + McpServerCredential value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = McpServerCredential.DeserializeMcpServerCredential(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); @@ -588,7 +776,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Get the session pools in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -615,7 +803,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Get the session pools in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -664,7 +852,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Get the session pools in a given resource group of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -693,7 +881,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Get the session pools in a given resource group of a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs index 3f44a1ae8802..178b6655fdd5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ContainerAppsSourceControlsRestOperations.cs @@ -32,7 +32,7 @@ public ContainerAppsSourceControlsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListByContainerAppRequest(string subscriptionId, stri } /// Get the Container App SourceControls in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListByContainerAppAsync(str } /// Get the Container App SourceControls in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a SourceControl of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App SourceControl. @@ -202,7 +202,7 @@ public async Task> GetAsync(string subsc } /// Get a SourceControl of a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App SourceControl. @@ -234,7 +234,7 @@ public Response Get(string subscriptionId, string } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data, string xMsGitHubAuxiliary) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,7 +250,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data, string xMsGitHubAuxiliary) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -267,6 +267,10 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(sourceControlName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsGitHubAuxiliary != null) + { + request.Headers.Add("x-ms-github-auxiliary", xMsGitHubAuxiliary); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -277,15 +281,16 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update the SourceControl for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App SourceControl. /// Properties used to create a Container App SourceControl. + /// Github personal access token used for SourceControl. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -293,7 +298,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re Argument.AssertNotNullOrEmpty(sourceControlName, nameof(sourceControlName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName, data, xMsGitHubAuxiliary); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -306,15 +311,16 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update the SourceControl for a Container App. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App SourceControl. /// Properties used to create a Container App SourceControl. + /// Github personal access token used for SourceControl. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, ContainerAppSourceControlData data, string xMsGitHubAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -322,7 +328,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, Argument.AssertNotNullOrEmpty(sourceControlName, nameof(sourceControlName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName, data, xMsGitHubAuxiliary); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -334,7 +340,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, string xMsGitHubAuxiliary, bool? ignoreWorkflowDeletionFailure, bool? deleteWorkflow) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,11 +352,19 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(containerAppName, true); uri.AppendPath("/sourcecontrols/", false); uri.AppendPath(sourceControlName, true); + if (ignoreWorkflowDeletionFailure != null) + { + uri.AppendQuery("ignoreWorkflowDeletionFailure", ignoreWorkflowDeletionFailure.Value, true); + } + if (deleteWorkflow != null) + { + uri.AppendQuery("deleteWorkflow", deleteWorkflow.Value, true); + } uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, string xMsGitHubAuxiliary, bool? ignoreWorkflowDeletionFailure, bool? deleteWorkflow) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -365,29 +379,44 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(containerAppName, true); uri.AppendPath("/sourcecontrols/", false); uri.AppendPath(sourceControlName, true); + if (ignoreWorkflowDeletionFailure != null) + { + uri.AppendQuery("ignoreWorkflowDeletionFailure", ignoreWorkflowDeletionFailure.Value, true); + } + if (deleteWorkflow != null) + { + uri.AppendQuery("deleteWorkflow", deleteWorkflow.Value, true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsGitHubAuxiliary != null) + { + request.Headers.Add("x-ms-github-auxiliary", xMsGitHubAuxiliary); + } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } /// Delete a Container App SourceControl. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App SourceControl. + /// Github personal access token used for SourceControl. + /// Ignore Workflow Deletion Failure. + /// Delete workflow. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = null, bool? deleteWorkflow = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); Argument.AssertNotNullOrEmpty(sourceControlName, nameof(sourceControlName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName, xMsGitHubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -401,21 +430,24 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Container App SourceControl. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// Name of the Container App SourceControl. + /// Github personal access token used for SourceControl. + /// Ignore Workflow Deletion Failure. + /// Delete workflow. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string containerAppName, string sourceControlName, string xMsGitHubAuxiliary = null, bool? ignoreWorkflowDeletionFailure = null, bool? deleteWorkflow = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); Argument.AssertNotNullOrEmpty(sourceControlName, nameof(sourceControlName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, containerAppName, sourceControlName, xMsGitHubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -452,7 +484,7 @@ internal HttpMessage CreateListByContainerAppNextPageRequest(string nextLink, st /// Get the Container App SourceControls in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. @@ -483,7 +515,7 @@ public async Task> ListByContainerAppNextPageA /// Get the Container App SourceControls in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentResiliencyPoliciesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentResiliencyPoliciesRestOperations.cs new file mode 100644 index 000000000000..15b0279e49b4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentResiliencyPoliciesRestOperations.cs @@ -0,0 +1,559 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class DaprComponentResiliencyPoliciesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DaprComponentResiliencyPoliciesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DaprComponentResiliencyPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string componentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string environmentName, string componentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the resiliency policies for a Dapr component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string environmentName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName, componentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DaprComponentResiliencyPoliciesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprComponentResiliencyPoliciesCollection.DeserializeDaprComponentResiliencyPoliciesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the resiliency policies for a Dapr component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string environmentName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName, componentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DaprComponentResiliencyPoliciesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprComponentResiliencyPoliciesCollection.DeserializeDaprComponentResiliencyPoliciesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Dapr component resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, componentName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DaprComponentResiliencyPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprComponentResiliencyPolicyData.DeserializeDaprComponentResiliencyPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DaprComponentResiliencyPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Dapr component resiliency policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, componentName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DaprComponentResiliencyPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprComponentResiliencyPolicyData.DeserializeDaprComponentResiliencyPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DaprComponentResiliencyPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, DaprComponentResiliencyPolicyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, DaprComponentResiliencyPolicyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a resiliency policy for a Dapr component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// Name of the Dapr Component Resiliency Policy. + /// Configuration details of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, DaprComponentResiliencyPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, componentName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DaprComponentResiliencyPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprComponentResiliencyPolicyData.DeserializeDaprComponentResiliencyPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a resiliency policy for a Dapr component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// Name of the Dapr Component Resiliency Policy. + /// Configuration details of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, DaprComponentResiliencyPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, componentName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DaprComponentResiliencyPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprComponentResiliencyPolicyData.DeserializeDaprComponentResiliencyPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprComponents/", false); + uri.AppendPath(componentName, true); + uri.AppendPath("/resiliencyPolicies/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a resiliency policy for a Dapr component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, componentName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a resiliency policy for a Dapr component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// Name of the Dapr Component Resiliency Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string environmentName, string componentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, componentName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, string componentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, string componentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the resiliency policies for a Dapr component. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName, componentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DaprComponentResiliencyPoliciesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprComponentResiliencyPoliciesCollection.DeserializeDaprComponentResiliencyPoliciesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the resiliency policies for a Dapr component. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr Component. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, string componentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(componentName, nameof(componentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName, componentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DaprComponentResiliencyPoliciesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprComponentResiliencyPoliciesCollection.DeserializeDaprComponentResiliencyPoliciesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs index 756dc4888ba7..a7e9953cc77c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprComponentsRestOperations.cs @@ -32,7 +32,7 @@ public DaprComponentsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get the Dapr Components for a managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string subscript } /// Get the Dapr Components for a managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -202,7 +202,7 @@ public async Task> GetAsync(string subsc } /// Get a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Dapr Component in a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -310,7 +310,7 @@ public async Task> CreateOrUpdateAsync(s } /// Creates or updates a Dapr Component in a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -381,7 +381,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Dapr Component from a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -408,7 +408,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Dapr Component from a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -475,7 +475,7 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// List secrets for a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -506,7 +506,7 @@ public async Task> ListSecretsAsync(string subsc } /// List secrets for a dapr component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Dapr Component. @@ -560,7 +560,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the Dapr Components for a managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -591,7 +591,7 @@ public async Task> ListNextPageAsync(string n /// Get the Dapr Components for a managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprSubscriptionsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprSubscriptionsRestOperations.cs new file mode 100644 index 000000000000..b5d3148d3928 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DaprSubscriptionsRestOperations.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class DaprSubscriptionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DaprSubscriptionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DaprSubscriptionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Dapr subscriptions for a managed environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DaprSubscriptionsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprSubscriptionsCollection.DeserializeDaprSubscriptionsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Dapr subscriptions for a managed environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DaprSubscriptionsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprSubscriptionsCollection.DeserializeDaprSubscriptionsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a dapr subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DaprSubscriptionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprSubscriptionData.DeserializeDaprSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DaprSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a dapr subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DaprSubscriptionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprSubscriptionData.DeserializeDaprSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DaprSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string name, DaprSubscriptionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string environmentName, string name, DaprSubscriptionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a Dapr subscription in a Managed Environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr subscription. + /// Configuration details of the Dapr subscription. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string environmentName, string name, DaprSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DaprSubscriptionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprSubscriptionData.DeserializeDaprSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a Dapr subscription in a Managed Environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr subscription. + /// Configuration details of the Dapr subscription. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string environmentName, string name, DaprSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DaprSubscriptionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprSubscriptionData.DeserializeDaprSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/daprSubscriptions/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Dapr subscription from a Managed Environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Dapr subscription from a Managed Environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the Dapr subscription. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Dapr subscriptions for a managed environment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DaprSubscriptionsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DaprSubscriptionsCollection.DeserializeDaprSubscriptionsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Dapr subscriptions for a managed environment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DaprSubscriptionsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DaprSubscriptionsCollection.DeserializeDaprSubscriptionsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DotNetComponentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DotNetComponentsRestOperations.cs new file mode 100644 index 000000000000..9f9ddf4b5e80 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/DotNetComponentsRestOperations.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppContainers.Models; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class DotNetComponentsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DotNetComponentsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DotNetComponentsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the .NET Components for a managed environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DotNetComponentsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DotNetComponentsCollection.DeserializeDotNetComponentsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the .NET Components for a managed environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DotNetComponentsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DotNetComponentsCollection.DeserializeDotNetComponentsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a .NET Component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DotNetComponentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DotNetComponentData.DeserializeDotNetComponentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DotNetComponentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a .NET Component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, environmentName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DotNetComponentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DotNetComponentData.DeserializeDotNetComponentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DotNetComponentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a .NET Component in a Managed Environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a .NET Component in a Managed Environment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, environmentName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patches a .NET Component using JSON Merge Patch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, environmentName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patches a .NET Component using JSON Merge Patch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// Configuration details of the .NET Component. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string environmentName, string name, DotNetComponentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, environmentName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string environmentName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/managedEnvironments/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/dotNetComponents/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a .NET Component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a .NET Component. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// Name of the .NET Component. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string environmentName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, environmentName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the .NET Components for a managed environment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DotNetComponentsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DotNetComponentsCollection.DeserializeDotNetComponentsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the .NET Components for a managed environment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Managed Environment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DotNetComponentsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DotNetComponentsCollection.DeserializeDotNetComponentsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/FunctionsExtensionRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/FunctionsExtensionRestOperations.cs new file mode 100644 index 000000000000..f09c398c09c1 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/FunctionsExtensionRestOperations.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppContainers +{ + internal partial class FunctionsExtensionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FunctionsExtensionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FunctionsExtensionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-10-02-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateInvokeFunctionsHostRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string revisionName, string functionAppName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/revisions/", false); + uri.AppendPath(revisionName, true); + uri.AppendPath("/providers/Microsoft.App/functions/", false); + uri.AppendPath(functionAppName, true); + uri.AppendPath("/invoke", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateInvokeFunctionsHostRequest(string subscriptionId, string resourceGroupName, string containerAppName, string revisionName, string functionAppName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/revisions/", false); + uri.AppendPath(revisionName, true); + uri.AppendPath("/providers/Microsoft.App/functions/", false); + uri.AppendPath(functionAppName, true); + uri.AppendPath("/invoke", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Proxies a Functions host call to the function app backed by the container app. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Container App Revision, the parent resource. + /// Name of the Function App, the extension resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> InvokeFunctionsHostAsync(string subscriptionId, string resourceGroupName, string containerAppName, string revisionName, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(revisionName, nameof(revisionName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateInvokeFunctionsHostRequest(subscriptionId, resourceGroupName, containerAppName, revisionName, functionAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + string value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = document.RootElement.GetString(); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Proxies a Functions host call to the function app backed by the container app. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Container App Revision, the parent resource. + /// Name of the Function App, the extension resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response InvokeFunctionsHost(string subscriptionId, string resourceGroupName, string containerAppName, string revisionName, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(revisionName, nameof(revisionName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateInvokeFunctionsHostRequest(subscriptionId, resourceGroupName, containerAppName, revisionName, functionAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + string value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = document.RootElement.GetString(); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/HttpRouteConfigRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/HttpRouteConfigRestOperations.cs index 640a8a6c24ca..1e6ce0616bf2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/HttpRouteConfigRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/HttpRouteConfigRestOperations.cs @@ -32,7 +32,7 @@ public HttpRouteConfigRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -74,8 +74,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get the specified Http Route Config. - /// The ID of the target subscription. + /// Get the specified Managed Http Route Config. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. @@ -107,8 +107,8 @@ public async Task> GetAsync(string sub } } - /// Get the specified Http Route Config. - /// The ID of the target subscription. + /// Get the specified Managed Http Route Config. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. @@ -183,11 +183,11 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update a Http Route Config. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. - /// Http Route Config to be created or updated. + /// Http Route config to be created or updated. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -217,11 +217,11 @@ public async Task> CreateOrUpdateAsync } /// Create or Update a Http Route Config. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. - /// Http Route Config to be created or updated. + /// Http Route config to be created or updated. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -292,8 +292,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Patches a Http Route Config resource. Only patching of tags is supported. - /// The ID of the target subscription. + /// Patches an http route config resource. Only patching of tags is supported. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. @@ -325,8 +325,8 @@ public async Task> UpdateAsync(string } } - /// Patches a Http Route Config resource. Only patching of tags is supported. - /// The ID of the target subscription. + /// Patches an http route config resource. Only patching of tags is supported. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. @@ -396,8 +396,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes the specified Http Route Config. - /// The ID of the target subscription. + /// Deletes the specified Managed Http Route. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. @@ -415,7 +415,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: + case 200: case 204: return message.Response; default: @@ -423,8 +423,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Deletes the specified Http Route Config. - /// The ID of the target subscription. + /// Deletes the specified Managed Http Route. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Http Route Config Resource. @@ -442,7 +442,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string e _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: + case 200: case 204: return message.Response; default: @@ -486,8 +486,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// List the Http Route Configs in a given managed environment. - /// The ID of the target subscription. + /// Get the Managed Http Routes in a given managed environment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -515,8 +515,8 @@ public async Task> ListAsync(string subscrip } } - /// List the Http Route Configs in a given managed environment. - /// The ID of the target subscription. + /// Get the Managed Http Routes in a given managed environment. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -566,9 +566,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List the Http Route Configs in a given managed environment. + /// Get the Managed Http Routes in a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -597,9 +597,9 @@ public async Task> ListNextPageAsync(string } } - /// List the Http Route Configs in a given managed environment. + /// Get the Managed Http Routes in a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JavaComponentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JavaComponentsRestOperations.cs index 5901458cece9..b4f8564ddff6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JavaComponentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JavaComponentsRestOperations.cs @@ -32,7 +32,7 @@ public JavaComponentsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get the Java Components for a managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string subscript } /// Get the Java Components for a managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Java Component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -202,7 +202,7 @@ public async Task> GetAsync(string subscriptionId, s } /// Get a Java Component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Java Component in a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -306,7 +306,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a Java Component in a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -377,7 +377,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a Java Component using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -406,7 +406,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Patches a Java Component using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -473,7 +473,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Java Component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -500,7 +500,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Java Component. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Java Component. @@ -550,7 +550,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the Java Components for a managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -581,7 +581,7 @@ public async Task> ListNextPageAsync(string n /// Get the Java Components for a managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs index 47d241ece4f6..4a8049ed8303 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsExecutionsRestOperations.cs @@ -32,7 +32,7 @@ public JobsExecutionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get a Container Apps Job's executions. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The filter to apply on the operation. @@ -111,7 +111,7 @@ public async Task> ListAsync(string subscrip } /// Get a Container Apps Job's executions. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The filter to apply on the operation. @@ -164,7 +164,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get a Container Apps Job's executions. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The filter to apply on the operation. @@ -196,7 +196,7 @@ public async Task> ListNextPageAsync(string /// Get a Container Apps Job's executions. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The filter to apply on the operation. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs index d0170bffe117..55c7be70a1a4 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/JobsRestOperations.cs @@ -32,7 +32,7 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListDetectorsRequest(string subscriptionId, string re } /// Get the list of diagnostics for a Container App Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListDetectorsAsync(string sub } /// Get the list of diagnostics for a Container App Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetDetectorRequest(string subscriptionId, string reso } /// Get the diagnostics data for a Container App Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Name of the Container App Job detector. @@ -202,7 +202,7 @@ public async Task> GetDetectorAsync(string } /// Get the diagnostics data for a Container App Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Name of the Container App Job detector. @@ -273,7 +273,7 @@ internal HttpMessage CreateProxyGetRequest(string subscriptionId, string resourc } /// Get the properties of a Container App Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Proxy API Name for Container App Job. @@ -306,7 +306,7 @@ public async Task> ProxyGetAsync(string subscripti } /// Get the properties of a Container App Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Proxy API Name for Container App Job. @@ -367,7 +367,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Get the Container Apps Jobs in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -392,7 +392,7 @@ public async Task> ListBySubscriptionAsync( } /// Get the Container Apps Jobs in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -449,7 +449,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Get the Container Apps Jobs in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -476,7 +476,7 @@ public async Task> ListByResourceGroupAsync } /// Get the Container Apps Jobs in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -537,7 +537,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the properties of a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -568,7 +568,7 @@ public async Task> GetAsync(string subscriptionId, } /// Get the properties of a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -637,7 +637,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Properties used to create a container apps job. @@ -664,7 +664,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or Update a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Properties used to create a container apps job. @@ -725,7 +725,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -751,7 +751,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -815,7 +815,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a Container Apps Job using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Properties used to create a container apps job. @@ -842,7 +842,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Patches a Container Apps Job using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Properties used to create a container apps job. @@ -912,7 +912,7 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr } /// Start a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Properties used to start a job execution. @@ -938,7 +938,7 @@ public async Task StartAsync(string subscriptionId, string resourceGro } /// Start a Container Apps Job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Properties used to start a job execution. @@ -1004,7 +1004,7 @@ internal HttpMessage CreateStopExecutionRequest(string subscriptionId, string re } /// Terminates execution of a running container apps job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Job execution name. @@ -1031,7 +1031,7 @@ public async Task StopExecutionAsync(string subscriptionId, string res } /// Terminates execution of a running container apps job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// Job execution name. @@ -1094,7 +1094,7 @@ internal HttpMessage CreateStopMultipleExecutionsRequest(string subscriptionId, } /// Terminates execution of a running container apps job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -1119,7 +1119,7 @@ public async Task StopMultipleExecutionsAsync(string subscriptionId, s } /// Terminates execution of a running container apps job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -1180,7 +1180,7 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// List secrets for a container apps job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -1209,7 +1209,7 @@ public async Task> ListSecretsAsync(string subscr } /// List secrets for a container apps job. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -1237,6 +1237,178 @@ public Response ListSecrets(string subscriptionId, string } } + internal RequestUriBuilder CreateResumeRequestUri(string subscriptionId, string resourceGroupName, string jobName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/resume", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateResumeRequest(string subscriptionId, string resourceGroupName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/resume", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Resumes a suspended job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResumeAsync(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateResumeRequest(subscriptionId, resourceGroupName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Resumes a suspended job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Resume(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateResumeRequest(subscriptionId, resourceGroupName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateSuspendRequestUri(string subscriptionId, string resourceGroupName, string jobName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/suspend", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateSuspendRequest(string subscriptionId, string resourceGroupName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendPath("/suspend", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Suspends a job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task SuspendAsync(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateSuspendRequest(subscriptionId, resourceGroupName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Suspends a job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Job. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Suspend(string subscriptionId, string resourceGroupName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateSuspendRequest(subscriptionId, resourceGroupName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDetectorsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string jobName) { var uri = new RawRequestUriBuilder(); @@ -1261,7 +1433,7 @@ internal HttpMessage CreateListDetectorsNextPageRequest(string nextLink, string /// Get the list of diagnostics for a Container App Job. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -1292,7 +1464,7 @@ public async Task> ListDetectorsNextPageAsync(st /// Get the list of diagnostics for a Container App Job. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Job Name. /// The cancellation token to use. @@ -1345,7 +1517,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Get the Container Apps Jobs in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -1372,7 +1544,7 @@ public async Task> ListBySubscriptionNextPa /// Get the Container Apps Jobs in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -1421,7 +1593,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Get the Container Apps Jobs in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -1450,7 +1622,7 @@ public async Task> ListByResourceGroupNextP /// Get the Container Apps Jobs in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/LogicAppsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/LogicAppsRestOperations.cs index 358314187d73..fce6a101e2b1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/LogicAppsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/LogicAppsRestOperations.cs @@ -32,7 +32,7 @@ public LogicAppsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,10 +75,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a logic app extension resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -108,10 +108,10 @@ public async Task> GetAsync(string subscriptionId, string } /// Gets a logic app extension resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -183,10 +183,10 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Logic App extension resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// Logic app resource properties. /// The cancellation token to use. /// , , , or is null. @@ -217,10 +217,10 @@ public async Task> CreateOrUpdateAsync(string subscriptio } /// Create or update a Logic App extension resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// Logic app resource properties. /// The cancellation token to use. /// , , , or is null. @@ -289,10 +289,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a Logic App extension resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -316,10 +316,10 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a Logic App extension resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -383,10 +383,10 @@ internal HttpMessage CreateListWorkflowsRequest(string subscriptionId, string re } /// List the workflows for a logic app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -414,10 +414,10 @@ public async Task> ListWorkflowsAsync(strin } /// List the workflows for a logic app. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -487,10 +487,10 @@ internal HttpMessage CreateGetWorkflowRequest(string subscriptionId, string reso } /// Get workflow information by its name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// Workflow name. /// The cancellation token to use. /// , , , or is null. @@ -522,10 +522,10 @@ public async Task> GetWorkflowAsync(strin } /// Get workflow information by its name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// Workflow name. /// The cancellation token to use. /// , , , or is null. @@ -556,6 +556,107 @@ public Response GetWorkflow(string subscriptionId, } } + internal RequestUriBuilder CreateDeployWorkflowArtifactsRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, WorkflowArtifacts workflowArtifacts) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/providers/Microsoft.App/logicApps/", false); + uri.AppendPath(logicAppName, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeployWorkflowArtifactsRequest(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, WorkflowArtifacts workflowArtifacts) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/providers/Microsoft.App/logicApps/", false); + uri.AppendPath(logicAppName, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (workflowArtifacts != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(workflowArtifacts, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Creates or updates the artifacts for the logic app. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Logic App, the extension resource. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeployWorkflowArtifactsAsync(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(logicAppName, nameof(logicAppName)); + + using var message = CreateDeployWorkflowArtifactsRequest(subscriptionId, resourceGroupName, containerAppName, logicAppName, workflowArtifacts); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates the artifacts for the logic app. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the Logic App, the extension resource. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeployWorkflowArtifacts(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(logicAppName, nameof(logicAppName)); + + using var message = CreateDeployWorkflowArtifactsRequest(subscriptionId, resourceGroupName, containerAppName, logicAppName, workflowArtifacts); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListWorkflowsConnectionsRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName) { var uri = new RawRequestUriBuilder(); @@ -597,10 +698,10 @@ internal HttpMessage CreateListWorkflowsConnectionsRequest(string subscriptionId } /// Gets logic app's connections. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -628,10 +729,10 @@ public async Task> ListWorkflowsConnectio } /// Gets logic app's connections. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -658,6 +759,114 @@ public Response ListWorkflowsConnections(string su } } + internal RequestUriBuilder CreateInvokeRequestUri(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, string xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/providers/Microsoft.App/logicApps/", false); + uri.AppendPath(logicAppName, true); + uri.AppendPath("/invoke", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateInvokeRequest(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, string xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.App/containerApps/", false); + uri.AppendPath(containerAppName, true); + uri.AppendPath("/providers/Microsoft.App/logicApps/", false); + uri.AppendPath(logicAppName, true); + uri.AppendPath("/invoke", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("x-ms-logicApps-proxy-path", xMsLogicAppsProxyPath); + request.Headers.Add("x-ms-logicApps-proxy-method", xMsLogicAppsProxyMethod.ToString()); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Proxies a the API call to the logic app backed by the container app. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the LogicApp App, the extension resource. + /// The proxy path for the API call. + /// The proxy method for the API call. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> InvokeAsync(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, string xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(logicAppName, nameof(logicAppName)); + Argument.AssertNotNull(xMsLogicAppsProxyPath, nameof(xMsLogicAppsProxyPath)); + + using var message = CreateInvokeRequest(subscriptionId, resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Proxies a the API call to the logic app backed by the container app. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Container App. + /// Name of the LogicApp App, the extension resource. + /// The proxy path for the API call. + /// The proxy method for the API call. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Invoke(string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName, string xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(containerAppName, nameof(containerAppName)); + Argument.AssertNotNullOrEmpty(logicAppName, nameof(logicAppName)); + Argument.AssertNotNull(xMsLogicAppsProxyPath, nameof(xMsLogicAppsProxyPath)); + + using var message = CreateInvokeRequest(subscriptionId, resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = BinaryData.FromStream(message.Response.ContentStream); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListWorkflowsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string containerAppName, string logicAppName) { var uri = new RawRequestUriBuilder(); @@ -682,10 +891,10 @@ internal HttpMessage CreateListWorkflowsNextPageRequest(string nextLink, string /// List the workflows for a logic app. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -715,10 +924,10 @@ public async Task> ListWorkflowsNextPageAsy /// List the workflows for a logic app. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Container App. - /// Name of the Logic App. + /// Name of the Logic App, the extension resource. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/MaintenanceConfigurationsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/MaintenanceConfigurationsRestOperations.cs index 404767fac4d6..407f66ee1a12 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/MaintenanceConfigurationsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/MaintenanceConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public MaintenanceConfigurationsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Gets all maintenance configurations in the specified Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string } /// Gets all maintenance configurations in the specified Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The cancellation token to use. @@ -173,7 +173,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update the maintenance configuration for Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The name of the maintenance configuration. @@ -207,7 +207,7 @@ public async Task> CreateOrUp } /// Create or update the maintenance configuration for Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The name of the maintenance configuration. @@ -279,7 +279,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the maintenance configuration of a ManagedEnvironment . - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The name of the maintenance configuration. @@ -306,7 +306,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the maintenance configuration of a ManagedEnvironment . - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The name of the maintenance configuration. @@ -371,7 +371,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the maintenance configuration of a ManagedEnvironment . - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The name of the maintenance configuration. @@ -404,7 +404,7 @@ public async Task> GetAsync(s } /// Gets the maintenance configuration of a ManagedEnvironment . - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The name of the maintenance configuration. @@ -460,7 +460,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all maintenance configurations in the specified Managed Environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The cancellation token to use. @@ -491,7 +491,7 @@ public async Task> ListNextPageAsyn /// Gets all maintenance configurations in the specified Managed Environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs index bc170ca2c939..638af5b1c43d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedCertificatesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedCertificatesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the specified Managed Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -108,7 +108,7 @@ public async Task> GetAsync(string } /// Get the specified Managed Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -183,7 +183,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update a Managed Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -212,7 +212,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or Update a Managed Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -279,7 +279,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Managed Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -306,7 +306,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Managed Certificate. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -375,7 +375,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a managed certificate. Oly patching of tags is supported. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -408,7 +408,7 @@ public async Task> UpdateAsync(stri } /// Patches a managed certificate. Oly patching of tags is supported. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// Name of the Managed Certificate. @@ -477,7 +477,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get the Managed Certificates in a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -506,7 +506,7 @@ public async Task> ListAsync(string subsc } /// Get the Managed Certificates in a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -558,7 +558,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the Managed Certificates in a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -589,7 +589,7 @@ public async Task> ListNextPageAsync(stri /// Get the Managed Certificates in a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs index 4840c57173ab..49bd0594a4a1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentDiagnosticsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedEnvironmentDiagnosticsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListDetectorsRequest(string subscriptionId, string re } /// Get the list of diagnostics for a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListDetectorsAsync(string sub } /// Get the list of diagnostics for a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetDetectorRequest(string subscriptionId, string reso } /// Get the diagnostics data for a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the Managed Environment detector. @@ -202,7 +202,7 @@ public async Task> GetDetectorAsync(string } /// Get the diagnostics data for a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the Managed Environment detector. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateEndpointConnectionsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateEndpointConnectionsRestOperations.cs index 969ac57651e3..d77b59ce94f7 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateEndpointConnectionsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedEnvironmentPrivateEndpointConnectionsRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List private endpoint connections for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> Lis } /// List private endpoint connections for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a private endpoint connection for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The name of the private endpoint connection associated with the Azure resource. @@ -202,7 +202,7 @@ public async Task> GetAsync( } /// Get a private endpoint connection for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The name of the private endpoint connection associated with the Azure resource. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Update the state of a private endpoint connection for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The name of the private endpoint connection associated with the Azure resource. @@ -306,7 +306,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Update the state of a private endpoint connection for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The name of the private endpoint connection associated with the Azure resource. @@ -373,7 +373,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a private endpoint connection for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The name of the private endpoint connection associated with the Azure resource. @@ -400,7 +400,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a private endpoint connection for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The name of the private endpoint connection associated with the Azure resource. @@ -450,7 +450,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List private endpoint connections for a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -481,7 +481,7 @@ public async Task> Lis /// List private endpoint connections for a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateLinkResourcesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateLinkResourcesRestOperations.cs index 25287f486ccf..2207b274ceb7 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateLinkResourcesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentPrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedEnvironmentPrivateLinkResourcesRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List private link resources for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string } /// List private link resources for a given managed environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -154,7 +154,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List private link resources for a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -185,7 +185,7 @@ public async Task> ListNextPageAsync /// List private link resources for a given managed environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentUsagesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentUsagesRestOperations.cs index ecd7585ca2fd..e783c9762cf0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentUsagesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentUsagesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedEnvironmentUsagesRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Gets the current usage information as well as the limits for environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string subscriptionId, s } /// Gets the current usage information as well as the limits for environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -154,7 +154,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets the current usage information as well as the limits for environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -185,7 +185,7 @@ public async Task> ListNextPageAsync(string nextLink, /// Gets the current usage information as well as the limits for environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs index 63998bffbbf4..f1b54e226641 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsDiagnosticsRestOperations.cs @@ -31,7 +31,7 @@ public ManagedEnvironmentsDiagnosticsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,7 +72,7 @@ internal HttpMessage CreateGetRootRequest(string subscriptionId, string resource } /// Get the properties of a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -103,7 +103,7 @@ public async Task> GetRootAsync(str } /// Get the properties of a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs index 292ab4956b11..635832e7b679 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedEnvironmentsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Get all Managed Environments for a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ public async Task> ListBySubscriptionAsy } /// Get all Managed Environments for a subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Get all the Managed Environments in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -174,7 +174,7 @@ public async Task> ListByResourceGroupAs } /// Get all the Managed Environments in a resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -235,7 +235,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the properties of a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -266,7 +266,7 @@ public async Task> GetAsync(string } /// Get the properties of a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -335,7 +335,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Configuration details of the Environment. @@ -362,7 +362,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a Managed Environment used to host container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Configuration details of the Environment. @@ -423,7 +423,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Managed Environment if it does not have any container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -449,7 +449,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Managed Environment if it does not have any container apps. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -513,7 +513,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Patches a Managed Environment using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Configuration details of the Environment. @@ -540,7 +540,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Patches a Managed Environment using JSON Merge Patch. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Configuration details of the Environment. @@ -603,7 +603,7 @@ internal HttpMessage CreateGetAuthTokenRequest(string subscriptionId, string res } /// Checks if resource name is available. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -632,7 +632,7 @@ public async Task> GetAuthTokenAsync( } /// Checks if resource name is available. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -697,7 +697,7 @@ internal HttpMessage CreateListWorkloadProfileStatesRequest(string subscriptionI } /// Get all workload Profile States for a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -726,7 +726,7 @@ public async Task> ListWorkloadProfile } /// Get all workload Profile States for a Managed Environment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -778,7 +778,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Get all Managed Environments for a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -805,7 +805,7 @@ public async Task> ListBySubscriptionNex /// Get all Managed Environments for a subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -854,7 +854,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Get all the Managed Environments in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -883,7 +883,7 @@ public async Task> ListByResourceGroupNe /// Get all the Managed Environments in a resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -934,7 +934,7 @@ internal HttpMessage CreateListWorkloadProfileStatesNextPageRequest(string nextL /// Get all workload Profile States for a Managed Environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. @@ -965,7 +965,7 @@ public async Task> ListWorkloadProfile /// Get all workload Profile States for a Managed Environment. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The cancellation token to use. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs index 9b86511edf2f..806513641c2f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/ManagedEnvironmentsStoragesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedEnvironmentsStoragesRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get all storages for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(stri } /// Get all storages for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get storage for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -202,7 +202,7 @@ public async Task> GetAsync( } /// Get storage for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -277,7 +277,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update storage for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -311,7 +311,7 @@ public async Task> CreateOrU } /// Create or update storage for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -383,7 +383,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete storage for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. @@ -410,7 +410,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete storage for a managedEnvironment. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Environment. /// Name of the storage. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs index a5100ad918e6..1c089c1ffc0f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/NamespacesRestOperations.cs @@ -32,7 +32,7 @@ public NamespacesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,7 +77,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, s } /// Checks if resource name is available. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The check name availability request. @@ -108,7 +108,7 @@ public async Task> CheckNameAvailab } /// Checks if resource name is available. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Managed Environment. /// The check name availability request. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/UsagesRestOperations.cs index d436fd8a2699..b5787b3e60b1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/RestOperations/UsagesRestOperations.cs @@ -32,7 +32,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-07-01"; + _apiVersion = apiVersion ?? "2025-10-02-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -69,7 +69,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca } /// Gets, for the specified location, the current resource usage information as well as the limits under the subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The location for which resource usage is queried. /// The cancellation token to use. /// is null. @@ -95,7 +95,7 @@ public async Task> ListAsync(string subscriptionId, A } /// Gets, for the specified location, the current resource usage information as well as the limits under the subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The location for which resource usage is queried. /// The cancellation token to use. /// is null. @@ -144,7 +144,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets, for the specified location, the current resource usage information as well as the limits under the subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The location for which resource usage is queried. /// The cancellation token to use. /// or is null. @@ -172,7 +172,7 @@ public async Task> ListNextPageAsync(string nextLink, /// Gets, for the specified location, the current resource usage information as well as the limits under the subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The location for which resource usage is queried. /// The cancellation token to use. /// or is null. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolCollection.cs index 683ef5fc55b7..58876afb7d88 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string session /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string sessionPoolName, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string sessionPoolName, Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string sessionPoolName, CancellationToken c /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.Serialization.cs index 42e815b013a5..1dbfd56e3780 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.Serialization.cs @@ -96,6 +96,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("sessionNetworkConfiguration"u8); writer.WriteObjectValue(SessionNetworkConfiguration, options); } + if (options.Format != "W" && Optional.IsDefined(TemplateUpdateStatus)) + { + writer.WritePropertyName("templateUpdateStatus"u8); + writer.WriteObjectValue(TemplateUpdateStatus, options); + } if (options.Format != "W" && Optional.IsDefined(PoolManagementEndpoint)) { writer.WritePropertyName("poolManagementEndpoint"u8); @@ -116,6 +121,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(McpServerSettings)) + { + writer.WritePropertyName("mcpServerSettings"u8); + writer.WriteObjectValue(McpServerSettings, options); + } writer.WriteEndObject(); } @@ -155,9 +165,11 @@ internal static SessionPoolData DeserializeSessionPoolData(JsonElement element, DynamicPoolConfiguration dynamicPoolConfiguration = default; CustomContainerTemplate customContainerTemplate = default; SessionNetworkConfiguration sessionNetworkConfiguration = default; + TemplateUpdateStatus templateUpdateStatus = default; Uri poolManagementEndpoint = default; SessionPoolProvisioningState? provisioningState = default; IList managedIdentitySettings = default; + McpServerSettings mcpServerSettings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -309,6 +321,15 @@ internal static SessionPoolData DeserializeSessionPoolData(JsonElement element, sessionNetworkConfiguration = SessionNetworkConfiguration.DeserializeSessionNetworkConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("templateUpdateStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + templateUpdateStatus = TemplateUpdateStatus.DeserializeTemplateUpdateStatus(property0.Value, options); + continue; + } if (property0.NameEquals("poolManagementEndpoint"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -341,6 +362,15 @@ internal static SessionPoolData DeserializeSessionPoolData(JsonElement element, managedIdentitySettings = array; continue; } + if (property0.NameEquals("mcpServerSettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mcpServerSettings = McpServerSettings.DeserializeMcpServerSettings(property0.Value, options); + continue; + } } continue; } @@ -367,9 +397,11 @@ internal static SessionPoolData DeserializeSessionPoolData(JsonElement element, dynamicPoolConfiguration, customContainerTemplate, sessionNetworkConfiguration, + templateUpdateStatus, poolManagementEndpoint, provisioningState, managedIdentitySettings ?? new ChangeTrackingList(), + mcpServerSettings, serializedAdditionalRawData); } @@ -656,6 +688,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TemplateUpdateStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" templateUpdateStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TemplateUpdateStatus)) + { + builder.Append(" templateUpdateStatus: "); + BicepSerializationHelpers.AppendChildObject(builder, TemplateUpdateStatus, options, 4, false, " templateUpdateStatus: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PoolManagementEndpoint), out propertyOverride); if (hasPropertyOverride) { @@ -709,6 +756,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(McpServerSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mcpServerSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(McpServerSettings)) + { + builder.Append(" mcpServerSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, McpServerSettings, options, 4, false, " mcpServerSettings: "); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.cs index d0288b4f5968..05a793c5496e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolData.cs @@ -76,11 +76,13 @@ public SessionPoolData(AzureLocation location) : base(location) /// The pool configuration if the poolManagementType is dynamic. /// The custom container configuration if the containerType is CustomContainer. /// The network configuration of the sessions in the session pool. + /// The template status of the session pool, showing active template, or desired template during session pool update. This is only available if the containerType is CustomContainer. /// The endpoint to manage the pool. /// Provisioning state of the session pool. /// Optional settings for a Managed Identity that is assigned to the Session pool. + /// The MCP server settings of the session pool. /// Keeps track of any properties unknown to the library. - internal SessionPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier environmentId, ContainerType? containerType, PoolManagementType? poolManagementType, int? nodeCount, SessionPoolScaleConfiguration scaleConfiguration, IList secrets, DynamicPoolConfiguration dynamicPoolConfiguration, CustomContainerTemplate customContainerTemplate, SessionNetworkConfiguration sessionNetworkConfiguration, Uri poolManagementEndpoint, SessionPoolProvisioningState? provisioningState, IList managedIdentitySettings, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal SessionPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier environmentId, ContainerType? containerType, PoolManagementType? poolManagementType, int? nodeCount, SessionPoolScaleConfiguration scaleConfiguration, IList secrets, DynamicPoolConfiguration dynamicPoolConfiguration, CustomContainerTemplate customContainerTemplate, SessionNetworkConfiguration sessionNetworkConfiguration, TemplateUpdateStatus templateUpdateStatus, Uri poolManagementEndpoint, SessionPoolProvisioningState? provisioningState, IList managedIdentitySettings, McpServerSettings mcpServerSettings, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; EnvironmentId = environmentId; @@ -92,9 +94,11 @@ internal SessionPoolData(ResourceIdentifier id, string name, ResourceType resour DynamicPoolConfiguration = dynamicPoolConfiguration; CustomContainerTemplate = customContainerTemplate; SessionNetworkConfiguration = sessionNetworkConfiguration; + TemplateUpdateStatus = templateUpdateStatus; PoolManagementEndpoint = poolManagementEndpoint; ProvisioningState = provisioningState; ManagedIdentitySettings = managedIdentitySettings; + McpServerSettings = mcpServerSettings; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -157,6 +161,9 @@ public SessionNetworkStatus? SessionNetworkStatus } } + /// The template status of the session pool, showing active template, or desired template during session pool update. This is only available if the containerType is CustomContainer. + [WirePath("properties.templateUpdateStatus")] + public TemplateUpdateStatus TemplateUpdateStatus { get; } /// The endpoint to manage the pool. [WirePath("properties.poolManagementEndpoint")] public Uri PoolManagementEndpoint { get; } @@ -166,5 +173,8 @@ public SessionNetworkStatus? SessionNetworkStatus /// Optional settings for a Managed Identity that is assigned to the Session pool. [WirePath("properties.managedIdentitySettings")] public IList ManagedIdentitySettings { get; } + /// The MCP server settings of the session pool. + [WirePath("properties.mcpServerSettings")] + public McpServerSettings McpServerSettings { get; set; } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.cs index 62d9700bd775..3d9dfc4cc8c6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -346,6 +346,158 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ses } } + /// + /// Fetch the MCP server credentials of a session pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/fetchMcpServerCredentials + /// + /// + /// Operation Id + /// ContainerAppsSessionPools_FetchMcpServerCredentials + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> FetchMcpServerCredentialsAsync(CancellationToken cancellationToken = default) + { + using var scope = _sessionPoolContainerAppsSessionPoolsClientDiagnostics.CreateScope("SessionPoolResource.FetchMcpServerCredentials"); + scope.Start(); + try + { + var response = await _sessionPoolContainerAppsSessionPoolsRestClient.FetchMcpServerCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Fetch the MCP server credentials of a session pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/fetchMcpServerCredentials + /// + /// + /// Operation Id + /// ContainerAppsSessionPools_FetchMcpServerCredentials + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response FetchMcpServerCredentials(CancellationToken cancellationToken = default) + { + using var scope = _sessionPoolContainerAppsSessionPoolsClientDiagnostics.CreateScope("SessionPoolResource.FetchMcpServerCredentials"); + scope.Start(); + try + { + var response = _sessionPoolContainerAppsSessionPoolsRestClient.FetchMcpServerCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Rotate and fetch the rotated MCP server credentials of a session pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/rotateMcpServerCredentials + /// + /// + /// Operation Id + /// ContainerAppsSessionPools_RotateMcpServerCredentials + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> RotateMcpServerCredentialsAsync(CancellationToken cancellationToken = default) + { + using var scope = _sessionPoolContainerAppsSessionPoolsClientDiagnostics.CreateScope("SessionPoolResource.RotateMcpServerCredentials"); + scope.Start(); + try + { + var response = await _sessionPoolContainerAppsSessionPoolsRestClient.RotateMcpServerCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Rotate and fetch the rotated MCP server credentials of a session pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}/rotateMcpServerCredentials + /// + /// + /// Operation Id + /// ContainerAppsSessionPools_RotateMcpServerCredentials + /// + /// + /// Default Api Version + /// 2025-10-02-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response RotateMcpServerCredentials(CancellationToken cancellationToken = default) + { + using var scope = _sessionPoolContainerAppsSessionPoolsClientDiagnostics.CreateScope("SessionPoolResource.RotateMcpServerCredentials"); + scope.Start(); + try + { + var response = _sessionPoolContainerAppsSessionPoolsRestClient.RotateMcpServerCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -359,7 +511,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ses /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -421,7 +573,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -483,7 +635,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -540,7 +692,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -597,7 +749,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource @@ -657,7 +809,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2025-07-01 + /// 2025-10-02-preview /// /// /// Resource diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md index 3fc55b6e72ae..8f36049705b3 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md @@ -7,8 +7,8 @@ azure-arm: true csharp: true library-name: AppContainers namespace: Azure.ResourceManager.AppContainers -require: https://github.com/Azure/azure-rest-api-specs/blob/33a2135c8115465b292b71a521ea50c1cc336c8c/specification/app/resource-manager/Microsoft.App/ContainerApps/readme.md -#tag: package-2025-07-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/444c6266f5941ca6c52845b3586f54a6314bd5ba/specification/app/resource-manager/Microsoft.App/ContainerApps/readme.md +#tag: package-2025-10-02-preview output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -128,6 +128,7 @@ rename-mapping: DaprSecret: ContainerAppDaprSecret Dapr: ContainerAppDaprConfiguration Dapr.enableApiLogging: IsApiLoggingEnabled + DaprSubscriptionBulkSubscribeOptions: DaprSubscriptionBulkSubscribeConfig DefaultAuthorizationPolicy: ContainerAppDefaultAuthorizationPolicy Diagnostics: ContainerAppDiagnostic DiagnosticDataProviderMetadata: ContainerAppDiagnosticDataProviderMetadata @@ -201,6 +202,7 @@ rename-mapping: ManagedEnvironment: ContainerAppManagedEnvironment ManagedEnvironment.properties.staticIp: -|ip-address ManagedEnvironment.properties.zoneRedundant: IsZoneRedundant + ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.enabled: IsPeerToPeerEncryptionEnabled ManagedEnvironmentStorage: ContainerAppManagedEnvironmentStorage ManagedIdentitySetting: SessionPoolManagedIdentitySetting Mtls.enabled: IsMtlsEnabled diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_AppResiliencyCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_AppResiliencyCollection.cs new file mode 100644 index 000000000000..67cc20514e27 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_AppResiliencyCollection.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_AppResiliencyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_CreateOrUpdate.json + // this example is just showing the usage of "AppResiliency_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this AppResiliencyResource + AppResiliencyCollection collection = containerApp.GetAppResiliencies(); + + // invoke the operation + string name = "resiliency-policy-1"; + AppResiliencyData data = new AppResiliencyData + { + TimeoutPolicy = new TimeoutPolicy + { + ResponseTimeoutInSeconds = 15, + ConnectionTimeoutInSeconds = 5, + }, + HttpRetryPolicy = new HttpRetryPolicy + { + MaxRetries = 5, + Headers = {new HeaderMatch +{ +Header = "X-Content-Type", +PrefixMatch = "GOATS", +}}, + HttpStatusCodes = { 502, 503 }, + Errors = { "5xx", "connect-failure", "reset", "retriable-headers", "retriable-status-codes" }, + InitialDelayInMilliseconds = 1000L, + MaxIntervalInMilliseconds = 10000L, + }, + TcpRetryMaxConnectAttempts = 3, + CircuitBreakerPolicy = new CircuitBreakerPolicy + { + ConsecutiveErrors = 5, + IntervalInSeconds = 10, + MaxEjectionPercent = 50, + }, + HttpConnectionPool = new HttpConnectionPool + { + Http1MaxPendingRequests = 1024, + Http2MaxRequests = 1024, + }, + MaxConnections = 100, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + AppResiliencyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppResiliencyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_Get.json + // this example is just showing the usage of "AppResiliency_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this AppResiliencyResource + AppResiliencyCollection collection = containerApp.GetAppResiliencies(); + + // invoke the operation + string name = "resiliency-policy-1"; + AppResiliencyResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppResiliencyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_List.json + // this example is just showing the usage of "AppResiliency_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this AppResiliencyResource + AppResiliencyCollection collection = containerApp.GetAppResiliencies(); + + // invoke the operation and iterate over the result + await foreach (AppResiliencyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppResiliencyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_Get.json + // this example is just showing the usage of "AppResiliency_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this AppResiliencyResource + AppResiliencyCollection collection = containerApp.GetAppResiliencies(); + + // invoke the operation + string name = "resiliency-policy-1"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_Get.json + // this example is just showing the usage of "AppResiliency_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this AppResiliencyResource + AppResiliencyCollection collection = containerApp.GetAppResiliencies(); + + // invoke the operation + string name = "resiliency-policy-1"; + NullableResponse response = await collection.GetIfExistsAsync(name); + AppResiliencyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppResiliencyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_AppResiliencyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_AppResiliencyResource.cs new file mode 100644 index 000000000000..d4fabab8fc05 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_AppResiliencyResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_AppResiliencyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_Get.json + // this example is just showing the usage of "AppResiliency_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppResiliencyResource created on azure + // for more information of creating AppResiliencyResource, please refer to the document of AppResiliencyResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + string name = "resiliency-policy-1"; + ResourceIdentifier appResiliencyResourceId = AppResiliencyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName, name); + AppResiliencyResource appResiliency = client.GetAppResiliencyResource(appResiliencyResourceId); + + // invoke the operation + AppResiliencyResource result = await appResiliency.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppResiliencyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_Delete.json + // this example is just showing the usage of "AppResiliency_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppResiliencyResource created on azure + // for more information of creating AppResiliencyResource, please refer to the document of AppResiliencyResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + string name = "resiliency-policy-1"; + ResourceIdentifier appResiliencyResourceId = AppResiliencyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName, name); + AppResiliencyResource appResiliency = client.GetAppResiliencyResource(appResiliencyResourceId); + + // invoke the operation + await appResiliency.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateAppResiliency() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AppResiliency_Patch.json + // this example is just showing the usage of "AppResiliency_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppResiliencyResource created on azure + // for more information of creating AppResiliencyResource, please refer to the document of AppResiliencyResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string appName = "testcontainerApp0"; + string name = "resiliency-policy-1"; + ResourceIdentifier appResiliencyResourceId = AppResiliencyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, appName, name); + AppResiliencyResource appResiliency = client.GetAppResiliencyResource(appResiliencyResourceId); + + // invoke the operation + AppResiliencyData data = new AppResiliencyData + { + TimeoutPolicy = new TimeoutPolicy + { + ResponseTimeoutInSeconds = 30, + ConnectionTimeoutInSeconds = 40, + }, + }; + AppResiliencyResource result = await appResiliency.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppResiliencyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuildResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuildResource.cs new file mode 100644 index 000000000000..57a7a0279931 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuildResource.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_BuildResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_Get.json + // this example is just showing the usage of "Builds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuildResource created on azure + // for more information of creating BuildResource, please refer to the document of BuildResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + string buildName = "testBuild"; + ResourceIdentifier buildResourceId = BuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName, buildName); + BuildResource buildResource = client.GetBuildResource(buildResourceId); + + // invoke the operation + BuildResource result = await buildResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_BuildsDelete0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_Delete.json + // this example is just showing the usage of "Builds_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuildResource created on azure + // for more information of creating BuildResource, please refer to the document of BuildResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + string buildName = "testBuild"; + ResourceIdentifier buildResourceId = BuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName, buildName); + BuildResource buildResource = client.GetBuildResource(buildResourceId); + + // invoke the operation + await buildResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_BuildsCreateOrUpdateNoConfig() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json + // this example is just showing the usage of "Builds_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuildResource created on azure + // for more information of creating BuildResource, please refer to the document of BuildResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + string buildName = "testBuild"; + ResourceIdentifier buildResourceId = BuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName, buildName); + BuildResource buildResource = client.GetBuildResource(buildResourceId); + + // invoke the operation + BuildResourceData data = new BuildResourceData(); + ArmOperation lro = await buildResource.UpdateAsync(WaitUntil.Completed, data); + BuildResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_BuildsCreateOrUpdateWithConfig() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_CreateOrUpdate.json + // this example is just showing the usage of "Builds_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuildResource created on azure + // for more information of creating BuildResource, please refer to the document of BuildResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + string buildName = "testBuild-123456789az"; + ResourceIdentifier buildResourceId = BuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName, buildName); + BuildResource buildResource = client.GetBuildResource(buildResourceId); + + // invoke the operation + BuildResourceData data = new BuildResourceData + { + DestinationContainerRegistry = new ContainerRegistryWithCustomImage("test.azurecr.io") + { + Image = "test.azurecr.io/repo:tag", + }, + Configuration = new BuildConfiguration + { + BaseOS = "DebianBullseye", + Platform = "dotnetcore", + PlatformVersion = "7.0", + EnvironmentVariables = { new EnvironmentVariable("foo1", "bar1"), new EnvironmentVariable("foo2", "bar2") }, + PreBuildSteps = {new PreBuildStep +{ +Description = "First pre build step.", +Scripts = {"echo 'hello'", "echo 'world'"}, +HttpGet = new HttpGet(new Uri("https://microsoft.com")) +{ +FileName = "output.txt", +Headers = {"foo", "bar"}, +}, +}, new PreBuildStep +{ +Description = "Second pre build step.", +Scripts = {"echo 'hello'", "echo 'again'"}, +HttpGet = new HttpGet(new Uri("https://microsoft.com")) +{ +FileName = "output.txt", +Headers = {"foo"}, +}, +}}, + }, + }; + ArmOperation lro = await buildResource.UpdateAsync(WaitUntil.Completed, data); + BuildResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetBuildAuthToken_GetBuildAuthToken() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_ListAuthToken.json + // this example is just showing the usage of "BuildAuthToken_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuildResource created on azure + // for more information of creating BuildResource, please refer to the document of BuildResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + string buildName = "testBuild"; + ResourceIdentifier buildResourceId = BuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName, buildName); + BuildResource buildResource = client.GetBuildResource(buildResourceId); + + // invoke the operation + BuildToken result = await buildResource.GetBuildAuthTokenAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuildResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuildResourceCollection.cs new file mode 100644 index 000000000000..57e0771adce9 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuildResourceCollection.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_BuildResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_BuildsCreateOrUpdateNoConfig() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json + // this example is just showing the usage of "Builds_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // get the collection of this BuildResource + BuildResourceCollection collection = builderResource.GetBuildResources(); + + // invoke the operation + string buildName = "testBuild"; + BuildResourceData data = new BuildResourceData(); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, buildName, data); + BuildResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_BuildsCreateOrUpdateWithConfig() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_CreateOrUpdate.json + // this example is just showing the usage of "Builds_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // get the collection of this BuildResource + BuildResourceCollection collection = builderResource.GetBuildResources(); + + // invoke the operation + string buildName = "testBuild-123456789az"; + BuildResourceData data = new BuildResourceData + { + DestinationContainerRegistry = new ContainerRegistryWithCustomImage("test.azurecr.io") + { + Image = "test.azurecr.io/repo:tag", + }, + Configuration = new BuildConfiguration + { + BaseOS = "DebianBullseye", + Platform = "dotnetcore", + PlatformVersion = "7.0", + EnvironmentVariables = { new EnvironmentVariable("foo1", "bar1"), new EnvironmentVariable("foo2", "bar2") }, + PreBuildSteps = {new PreBuildStep +{ +Description = "First pre build step.", +Scripts = {"echo 'hello'", "echo 'world'"}, +HttpGet = new HttpGet(new Uri("https://microsoft.com")) +{ +FileName = "output.txt", +Headers = {"foo", "bar"}, +}, +}, new PreBuildStep +{ +Description = "Second pre build step.", +Scripts = {"echo 'hello'", "echo 'again'"}, +HttpGet = new HttpGet(new Uri("https://microsoft.com")) +{ +FileName = "output.txt", +Headers = {"foo"}, +}, +}}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, buildName, data); + BuildResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_Get.json + // this example is just showing the usage of "Builds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // get the collection of this BuildResource + BuildResourceCollection collection = builderResource.GetBuildResources(); + + // invoke the operation + string buildName = "testBuild"; + BuildResource result = await collection.GetAsync(buildName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BuildsListByBuilderResource0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_ListByBuilderResource.json + // this example is just showing the usage of "BuildsByBuilderResource_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // get the collection of this BuildResource + BuildResourceCollection collection = builderResource.GetBuildResources(); + + // invoke the operation and iterate over the result + await foreach (BuildResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_Get.json + // this example is just showing the usage of "Builds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // get the collection of this BuildResource + BuildResourceCollection collection = builderResource.GetBuildResources(); + + // invoke the operation + string buildName = "testBuild"; + bool result = await collection.ExistsAsync(buildName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builds_Get.json + // this example is just showing the usage of "Builds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // get the collection of this BuildResource + BuildResourceCollection collection = builderResource.GetBuildResources(); + + // invoke the operation + string buildName = "testBuild"; + NullableResponse response = await collection.GetIfExistsAsync(buildName); + BuildResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuilderResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuilderResource.cs new file mode 100644 index 000000000000..ec824179e2c4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuilderResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_BuilderResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BuildersGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_Get.json + // this example is just showing the usage of "Builders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // invoke the operation + BuilderResource result = await builderResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuilderResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_BuildersDelete0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_Delete.json + // this example is just showing the usage of "Builders_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // invoke the operation + await builderResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_BuildersUpdate0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_Update.json + // this example is just showing the usage of "Builders_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BuilderResource created on azure + // for more information of creating BuilderResource, please refer to the document of BuilderResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string builderName = "testBuilder"; + ResourceIdentifier builderResourceId = BuilderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, builderName); + BuilderResource builderResource = client.GetBuilderResource(builderResourceId); + + // invoke the operation + BuilderResourcePatch patch = new BuilderResourcePatch + { + Tags = +{ +["mytag1"] = "myvalue1" +}, + }; + ArmOperation lro = await builderResource.UpdateAsync(WaitUntil.Completed, patch); + BuilderResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuilderResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuilderResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuilderResourceCollection.cs new file mode 100644 index 000000000000..8f0358d727c4 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_BuilderResourceCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_BuilderResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_BuildersCreateOrUpdate0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_CreateOrUpdate.json + // this example is just showing the usage of "Builders_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BuilderResource + BuilderResourceCollection collection = resourceGroupResource.GetBuilderResources(); + + // invoke the operation + string builderName = "testBuilder"; + BuilderResourceData data = new BuilderResourceData(new AzureLocation("eastus")) + { + Identity = new ManagedServiceIdentity("SystemAssigned,UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")] = new UserAssignedIdentity() +}, + }, + EnvironmentId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"), + ContainerRegistries = { new ContainerRegistry("test.azurecr.io", new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")), new ContainerRegistry("test2.azurecr.io", new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")) }, + Tags = +{ +["company"] = "Microsoft" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, builderName, data); + BuilderResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuilderResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BuildersGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_Get.json + // this example is just showing the usage of "Builders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BuilderResource + BuilderResourceCollection collection = resourceGroupResource.GetBuilderResources(); + + // invoke the operation + string builderName = "testBuilder"; + BuilderResource result = await collection.GetAsync(builderName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuilderResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BuildersListByResourceGroup0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_ListByResourceGroup.json + // this example is just showing the usage of "Builders_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BuilderResource + BuilderResourceCollection collection = resourceGroupResource.GetBuilderResources(); + + // invoke the operation and iterate over the result + await foreach (BuilderResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuilderResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BuildersGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_Get.json + // this example is just showing the usage of "Builders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BuilderResource + BuilderResourceCollection collection = resourceGroupResource.GetBuilderResources(); + + // invoke the operation + string builderName = "testBuilder"; + bool result = await collection.ExistsAsync(builderName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BuildersGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_Get.json + // this example is just showing the usage of "Builders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this BuilderResource + BuilderResourceCollection collection = resourceGroupResource.GetBuilderResources(); + + // invoke the operation + string builderName = "testBuilder"; + NullableResponse response = await collection.GetIfExistsAsync(builderName); + BuilderResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuilderResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs index 8f26482a097b..1e9c2ada10a0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppAuthConfigCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateContainerAppAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,11 +78,157 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppAuthConfig() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateContainerAppAuthConfigWithMsiClientIDBlobStorageTokenStore() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_BlobStorageTokenStore_ClientId_CreateOrUpdate.json + // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string containerAppName = "myapp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppAuthConfigResource + ContainerAppAuthConfigCollection collection = containerApp.GetContainerAppAuthConfigs(); + + // invoke the operation + string authConfigName = "current"; + ContainerAppAuthConfigData data = new ContainerAppAuthConfigData + { + Platform = new ContainerAppAuthPlatform + { + IsEnabled = true, + }, + GlobalValidation = new ContainerAppGlobalValidation + { + UnauthenticatedClientAction = ContainerAppUnauthenticatedClientActionV2.AllowAnonymous, + }, + IdentityProviders = new ContainerAppIdentityProvidersConfiguration + { + Facebook = new ContainerAppFacebookConfiguration + { + Registration = new ContainerAppRegistration + { + AppId = "123", + AppSecretSettingName = "facebook-secret", + }, + }, + }, + Login = new ContainerAppLogin + { + TokenStore = new ContainerAppTokenStore + { + AzureBlobStorage = new BlobStorageTokenStore + { + BlobContainerUri = new Uri("https://test.blob.core.windows.net/container1"), + ClientId = "00000000-0000-0000-0000-000000000000", + }, + }, + }, + EncryptionSettings = new EncryptionSettings + { + ContainerAppAuthEncryptionSecretName = "testEncryptionSecretName", + ContainerAppAuthSigningSecretName = "testSigningSecretName", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authConfigName, data); + ContainerAppAuthConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppAuthConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateContainerAppAuthConfigWithMsiManagedIdentityResourceIdBlobStorageTokenStore() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_BlobStorageTokenStore_CreateOrUpdate.json + // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string containerAppName = "myapp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppAuthConfigResource + ContainerAppAuthConfigCollection collection = containerApp.GetContainerAppAuthConfigs(); + + // invoke the operation + string authConfigName = "current"; + ContainerAppAuthConfigData data = new ContainerAppAuthConfigData + { + Platform = new ContainerAppAuthPlatform + { + IsEnabled = true, + }, + GlobalValidation = new ContainerAppGlobalValidation + { + UnauthenticatedClientAction = ContainerAppUnauthenticatedClientActionV2.AllowAnonymous, + }, + IdentityProviders = new ContainerAppIdentityProvidersConfiguration + { + Facebook = new ContainerAppFacebookConfiguration + { + Registration = new ContainerAppRegistration + { + AppId = "123", + AppSecretSettingName = "facebook-secret", + }, + }, + }, + Login = new ContainerAppLogin + { + TokenStore = new ContainerAppTokenStore + { + AzureBlobStorage = new BlobStorageTokenStore + { + BlobContainerUri = new Uri("https://test.blob.core.windows.net/container1"), + ManagedIdentityResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + }, + }, + }, + EncryptionSettings = new EncryptionSettings + { + ContainerAppAuthEncryptionSecretName = "testEncryptionSecretName", + ContainerAppAuthSigningSecretName = "testSigningSecretName", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authConfigName, data); + ContainerAppAuthConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppAuthConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_Get.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +262,7 @@ public async Task Get_GetContainerAppSAuthConfig() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAuthConfigsByContainerApps() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_ListByContainer.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_ListByContainer.json // this example is just showing the usage of "ContainerAppsAuthConfigs_ListByContainerApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +298,7 @@ public async Task GetAll_ListAuthConfigsByContainerApps() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppSAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_Get.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +328,7 @@ public async Task Exists_GetContainerAppSAuthConfig() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppSAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_Get.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs index 2f1762d81fc6..2823b110d5a1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppAuthConfigResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppAuthConfigResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_Get.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetContainerAppSAuthConfig() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteContainerAppAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_Delete.json // this example is just showing the usage of "ContainerAppsAuthConfigs_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteContainerAppAuthConfig() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateContainerAppAuthConfig() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AuthConfigs_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,5 +132,145 @@ public async Task Update_CreateOrUpdateContainerAppAuthConfig() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateContainerAppAuthConfigWithMsiClientIDBlobStorageTokenStore() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_BlobStorageTokenStore_ClientId_CreateOrUpdate.json + // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppAuthConfigResource created on azure + // for more information of creating ContainerAppAuthConfigResource, please refer to the document of ContainerAppAuthConfigResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string containerAppName = "myapp"; + string authConfigName = "current"; + ResourceIdentifier containerAppAuthConfigResourceId = ContainerAppAuthConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, authConfigName); + ContainerAppAuthConfigResource containerAppAuthConfig = client.GetContainerAppAuthConfigResource(containerAppAuthConfigResourceId); + + // invoke the operation + ContainerAppAuthConfigData data = new ContainerAppAuthConfigData + { + Platform = new ContainerAppAuthPlatform + { + IsEnabled = true, + }, + GlobalValidation = new ContainerAppGlobalValidation + { + UnauthenticatedClientAction = ContainerAppUnauthenticatedClientActionV2.AllowAnonymous, + }, + IdentityProviders = new ContainerAppIdentityProvidersConfiguration + { + Facebook = new ContainerAppFacebookConfiguration + { + Registration = new ContainerAppRegistration + { + AppId = "123", + AppSecretSettingName = "facebook-secret", + }, + }, + }, + Login = new ContainerAppLogin + { + TokenStore = new ContainerAppTokenStore + { + AzureBlobStorage = new BlobStorageTokenStore + { + BlobContainerUri = new Uri("https://test.blob.core.windows.net/container1"), + ClientId = "00000000-0000-0000-0000-000000000000", + }, + }, + }, + EncryptionSettings = new EncryptionSettings + { + ContainerAppAuthEncryptionSecretName = "testEncryptionSecretName", + ContainerAppAuthSigningSecretName = "testSigningSecretName", + }, + }; + ArmOperation lro = await containerAppAuthConfig.UpdateAsync(WaitUntil.Completed, data); + ContainerAppAuthConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppAuthConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateContainerAppAuthConfigWithMsiManagedIdentityResourceIdBlobStorageTokenStore() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AuthConfigs_BlobStorageTokenStore_CreateOrUpdate.json + // this example is just showing the usage of "ContainerAppsAuthConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppAuthConfigResource created on azure + // for more information of creating ContainerAppAuthConfigResource, please refer to the document of ContainerAppAuthConfigResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string containerAppName = "myapp"; + string authConfigName = "current"; + ResourceIdentifier containerAppAuthConfigResourceId = ContainerAppAuthConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, authConfigName); + ContainerAppAuthConfigResource containerAppAuthConfig = client.GetContainerAppAuthConfigResource(containerAppAuthConfigResourceId); + + // invoke the operation + ContainerAppAuthConfigData data = new ContainerAppAuthConfigData + { + Platform = new ContainerAppAuthPlatform + { + IsEnabled = true, + }, + GlobalValidation = new ContainerAppGlobalValidation + { + UnauthenticatedClientAction = ContainerAppUnauthenticatedClientActionV2.AllowAnonymous, + }, + IdentityProviders = new ContainerAppIdentityProvidersConfiguration + { + Facebook = new ContainerAppFacebookConfiguration + { + Registration = new ContainerAppRegistration + { + AppId = "123", + AppSecretSettingName = "facebook-secret", + }, + }, + }, + Login = new ContainerAppLogin + { + TokenStore = new ContainerAppTokenStore + { + AzureBlobStorage = new BlobStorageTokenStore + { + BlobContainerUri = new Uri("https://test.blob.core.windows.net/container1"), + ManagedIdentityResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + }, + }, + }, + EncryptionSettings = new EncryptionSettings + { + ContainerAppAuthEncryptionSecretName = "testEncryptionSecretName", + ContainerAppAuthSigningSecretName = "testSigningSecretName", + }, + }; + ArmOperation lro = await containerAppAuthConfig.UpdateAsync(WaitUntil.Completed, data); + ContainerAppAuthConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppAuthConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppCollection.cs index 56a11888bcd8..647f5fc240c0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppCollection.cs @@ -18,11 +18,243 @@ namespace Azure.ResourceManager.AppContainers.Samples { public partial class Sample_ContainerAppCollection { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateAppKind() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Kind_CreateOrUpdate.json + // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppResource + ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); + + // invoke the operation + string containerAppName = "testcontainerAppKind"; + ContainerAppData data = new ContainerAppData(new AzureLocation("East Us")) + { + ManagedBy = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind", + Kind = ContainerAppKind.Workflowapp, + ManagedEnvironmentId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3"), + Configuration = new ContainerAppConfiguration + { + ActiveRevisionsMode = ContainerAppActiveRevisionsMode.Single, + Ingress = new ContainerAppIngressConfiguration + { + External = true, + TargetPort = 80, + AllowInsecure = true, + }, + }, + Template = new ContainerAppTemplate + { + Containers = {new ContainerAppContainer +{ +Image = "default/logicapps-base:latest", +Name = "logicapps-container", +Resources = new AppContainerResources +{ +Cpu = 1, +Memory = "2.0Gi", +}, +}}, + Scale = new ContainerAppScale + { + MinReplicas = 1, + MaxReplicas = 30, + CooldownPeriod = 350, + PollingInterval = 35, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerAppName, data); + ContainerAppResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateAppOnAConnectedEnvironment() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_CreateOrUpdate_ConnectedEnvironment.json + // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppResource + ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); + + // invoke the operation + string containerAppName = "testcontainerApp0"; + ContainerAppData data = new ContainerAppData(new AzureLocation("East US")) + { + ExtendedLocation = new ContainerAppExtendedLocation + { + Name = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", + ExtendedLocationType = ContainerAppExtendedLocationType.CustomLocation, + }, + EnvironmentId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube"), + Configuration = new ContainerAppConfiguration + { + Ingress = new ContainerAppIngressConfiguration + { + External = true, + TargetPort = 3000, + Traffic = {new ContainerAppRevisionTrafficWeight +{ +RevisionName = "testcontainerApp0-ab1234", +Weight = 100, +Label = "production", +}}, + CustomDomains = {new ContainerAppCustomDomain("www.my-name.com") +{ +BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), +}, new ContainerAppCustomDomain("www.my-other-name.com") +{ +BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), +}}, + IPSecurityRestrictions = {new ContainerAppIPSecurityRestrictionRule("Allow work IP A subnet", "192.168.1.1/32", ContainerAppIPRuleAction.Allow) +{ +Description = "Allowing all IP's within the subnet below to access containerapp", +}, new ContainerAppIPSecurityRestrictionRule("Allow work IP B subnet", "192.168.1.1/8", ContainerAppIPRuleAction.Allow) +{ +Description = "Allowing all IP's within the subnet below to access containerapp", +}}, + StickySessionsAffinity = Affinity.Sticky, + ClientCertificateMode = ContainerAppIngressClientCertificateMode.Accept, + CorsPolicy = new ContainerAppCorsPolicy(new string[] { "https://a.test.com", "https://b.test.com" }) + { + AllowedMethods = { "GET", "POST" }, + AllowedHeaders = { "HEADER1", "HEADER2" }, + ExposeHeaders = { "HEADER3", "HEADER4" }, + MaxAge = 1234, + AllowCredentials = true, + }, + AdditionalPortMappings = {new IngressPortMapping(true, 1234), new IngressPortMapping(false, 2345) +{ +ExposedPort = 3456, +}}, + }, + Dapr = new ContainerAppDaprConfiguration + { + IsEnabled = true, + AppProtocol = ContainerAppProtocol.Http, + AppPort = 3000, + HttpReadBufferSize = 30, + HttpMaxRequestSize = 10, + LogLevel = ContainerAppDaprLogLevel.Debug, + IsApiLoggingEnabled = true, + }, + Runtime = new Runtime + { + Java = new RuntimeJava + { + EnableMetrics = true, + JavaAgent = new RuntimeJavaAgent + { + IsEnabled = true, + LoggingLoggerSettings = { new LoggerSetting("org.springframework.boot", Level.Debug) }, + }, + }, + AutoConfigureDataProtection = true, + }, + MaxInactiveRevisions = 10, + RevisionTransitionThreshold = 100, + }, + Template = new ContainerAppTemplate + { + InitContainers = {new ContainerAppInitContainer +{ +Image = "repo/testcontainerApp0:v4", +Name = "testinitcontainerApp0", +Command = {"/bin/sh"}, +Args = {"-c", "while true; do echo hello; sleep 10;done"}, +Resources = new AppContainerResources +{ +Cpu = 0.2, +Memory = "100Mi", +}, +}}, + Containers = {new ContainerAppContainer +{ +Probes = {new ContainerAppProbe +{ +HttpGet = new ContainerAppHttpRequestInfo(8080) +{ +HttpHeaders = {new ContainerAppHttpHeaderInfo("Custom-Header", "Awesome")}, +Path = "/health", +}, +InitialDelaySeconds = 3, +PeriodSeconds = 3, +ProbeType = ContainerAppProbeType.Liveness, +}}, +Image = "repo/testcontainerApp0:v1", +Name = "testcontainerApp0", +}}, + Scale = new ContainerAppScale + { + MinReplicas = 1, + MaxReplicas = 5, + CooldownPeriod = 350, + PollingInterval = 35, + Rules = {new ContainerAppScaleRule +{ +Name = "httpscalingrule", +Custom = new ContainerAppCustomScaleRule +{ +CustomScaleRuleType = "http", +Metadata = +{ +["concurrentRequests"] = "50" +}, +}, +}}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerAppName, data); + ContainerAppResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_CreateOrUpdate.json // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -41,7 +273,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); // invoke the operation - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ContainerAppData data = new ContainerAppData(new AzureLocation("East US")) { Identity = new ManagedServiceIdentity("SystemAssigned,UserAssigned") @@ -61,7 +293,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() TargetPort = 3000, Traffic = {new ContainerAppRevisionTrafficWeight { -RevisionName = "testcontainerapp0-ab1234", +RevisionName = "testcontainerApp0-ab1234", Weight = 100, Label = "production", }}, @@ -115,8 +347,21 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() }, MaxConcurrency = 10, }, - EnableMetrics = true, + Runtime = new Runtime + { + Java = new RuntimeJava + { + EnableMetrics = true, + JavaAgent = new RuntimeJavaAgent + { + IsEnabled = true, + LoggingLoggerSettings = { new LoggerSetting("org.springframework.boot", Level.Debug) }, + }, + }, + AutoConfigureDataProtection = true, + }, MaxInactiveRevisions = 10, + RevisionTransitionThreshold = 100, ServiceType = "redis", IdentitySettings = {new ContainerAppIdentitySettings("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") { @@ -130,14 +375,15 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() { InitContainers = {new ContainerAppInitContainer { -Image = "repo/testcontainerapp0:v4", +Image = "repo/testcontainerApp0:v4", Name = "testinitcontainerApp0", Command = {"/bin/sh"}, Args = {"-c", "while true; do echo hello; sleep 10;done"}, Resources = new AppContainerResources { -Cpu = 0.5, -Memory = "1Gi", +Cpu = 0.2, +Memory = "100Mi", +Gpu = 1, }, }}, Containers = {new ContainerAppContainer @@ -153,8 +399,8 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() PeriodSeconds = 3, ProbeType = ContainerAppProbeType.Liveness, }}, -Image = "repo/testcontainerapp0:v1", -Name = "testcontainerapp0", +Image = "repo/testcontainerApp0:v1", +Name = "testcontainerApp0", VolumeMounts = {new ContainerAppVolumeMount { VolumeName = "azurefile", @@ -225,90 +471,12 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerApp() { ServiceId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService"), Name = "redisService", -}}, - }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerAppName, data); - ContainerAppResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ContainerAppData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateOrUpdateFunctionAppKind() - { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Kind_FunctionApp_CreateOrUpdate.json - // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rg"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this ContainerAppResource - ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); - - // invoke the operation - string containerAppName = "testcontainerAppFunctionKind"; - ContainerAppData data = new ContainerAppData(new AzureLocation("East Us")) - { - ManagedBy = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppFunctionKind", - Kind = ContainerAppKind.Functionapp, - ManagedEnvironmentId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3"), - Configuration = new ContainerAppConfiguration - { - ActiveRevisionsMode = ContainerAppActiveRevisionsMode.Single, - Ingress = new ContainerAppIngressConfiguration - { - External = true, - TargetPort = 80, - AllowInsecure = false, - }, - }, - Template = new ContainerAppTemplate - { - Containers = {new ContainerAppContainer -{ -Image = "mcr.microsoft.com/azure-functions/dotnet:4", -Name = "function-app-container", -Env = {new ContainerAppEnvironmentVariable -{ -Name = "AzureWebJobsStorage", -Value = "DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=mykey;EndpointSuffix=core.windows.net", -}, new ContainerAppEnvironmentVariable +ClientType = "dotnet", +CustomizedKeys = { -Name = "FUNCTIONS_WORKER_RUNTIME", -Value = "dotnet", -}, new ContainerAppEnvironmentVariable -{ -Name = "WEBSITES_ENABLE_APP_SERVICE_STORAGE", -Value = "false", -}}, -Resources = new AppContainerResources -{ -Cpu = 0.5, -Memory = "1.0Gi", +["DesiredKey"] = "defaultKey" }, }}, - Scale = new ContainerAppScale - { - MinReplicas = 0, - MaxReplicas = 10, - CooldownPeriod = 300, - PollingInterval = 30, - }, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerAppName, data); @@ -325,7 +493,7 @@ public async Task CreateOrUpdate_CreateOrUpdateFunctionAppKind() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateManagedByApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -344,7 +512,7 @@ public async Task CreateOrUpdate_CreateOrUpdateManagedByApp() ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); // invoke the operation - string containerAppName = "testcontainerappmanagedby"; + string containerAppName = "testcontainerAppManagedBy"; ContainerAppData data = new ContainerAppData(new AzureLocation("East US")) { ManagedBy = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp", @@ -359,7 +527,7 @@ public async Task CreateOrUpdate_CreateOrUpdateManagedByApp() Transport = ContainerAppIngressTransportMethod.Tcp, Traffic = {new ContainerAppRevisionTrafficWeight { -RevisionName = "testcontainerappmanagedby-ab1234", +RevisionName = "testcontainerAppManagedBy-ab1234", Weight = 100, }}, }, @@ -375,8 +543,8 @@ public async Task CreateOrUpdate_CreateOrUpdateManagedByApp() TcpSocket = new ContainerAppTcpSocketRequestInfo(8080), ProbeType = ContainerAppProbeType.Liveness, }}, -Image = "repo/testcontainerappmanagedby:v1", -Name = "testcontainerappmanagedby", +Image = "repo/testcontainerAppManagedBy:v1", +Name = "testcontainerAppManagedBy", }}, Scale = new ContainerAppScale { @@ -410,9 +578,9 @@ public async Task CreateOrUpdate_CreateOrUpdateManagedByApp() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateOrUpdateTcpApp() + public async Task CreateOrUpdate_CreateOrUpdateSourceToCloudApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_SourceToCloudApp_CreateOrUpdate.json // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -431,38 +599,110 @@ public async Task CreateOrUpdate_CreateOrUpdateTcpApp() ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); // invoke the operation - string containerAppName = "testcontainerapptcp"; + string containerAppName = "testcontainerApp0"; ContainerAppData data = new ContainerAppData(new AzureLocation("East US")) { EnvironmentId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), + WorkloadProfileName = "My-GP-01", + PatchingMode = PatchingMode.Automatic, Configuration = new ContainerAppConfiguration { Ingress = new ContainerAppIngressConfiguration { External = true, TargetPort = 3000, - ExposedPort = 4000, - Transport = ContainerAppIngressTransportMethod.Tcp, Traffic = {new ContainerAppRevisionTrafficWeight { -RevisionName = "testcontainerapptcp-ab1234", +RevisionName = "testcontainerApp0-ab1234", Weight = 100, +Label = "production", +}}, + CustomDomains = {new ContainerAppCustomDomain("www.my-name.com") +{ +BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), +}, new ContainerAppCustomDomain("www.my-other-name.com") +{ +BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"), +}}, + IPSecurityRestrictions = {new ContainerAppIPSecurityRestrictionRule("Allow work IP A subnet", "192.168.1.1/32", ContainerAppIPRuleAction.Allow) +{ +Description = "Allowing all IP's within the subnet below to access containerapp", +}, new ContainerAppIPSecurityRestrictionRule("Allow work IP B subnet", "192.168.1.1/8", ContainerAppIPRuleAction.Allow) +{ +Description = "Allowing all IP's within the subnet below to access containerapp", +}}, + StickySessionsAffinity = Affinity.Sticky, + ClientCertificateMode = ContainerAppIngressClientCertificateMode.Accept, + CorsPolicy = new ContainerAppCorsPolicy(new string[] { "https://a.test.com", "https://b.test.com" }) + { + AllowedMethods = { "GET", "POST" }, + AllowedHeaders = { "HEADER1", "HEADER2" }, + ExposeHeaders = { "HEADER3", "HEADER4" }, + MaxAge = 1234, + AllowCredentials = true, + }, + AdditionalPortMappings = {new IngressPortMapping(true, 1234), new IngressPortMapping(false, 2345) +{ +ExposedPort = 3456, }}, }, + Dapr = new ContainerAppDaprConfiguration + { + IsEnabled = true, + AppProtocol = ContainerAppProtocol.Http, + AppPort = 3000, + HttpReadBufferSize = 30, + HttpMaxRequestSize = 10, + LogLevel = ContainerAppDaprLogLevel.Debug, + IsApiLoggingEnabled = true, + }, + MaxInactiveRevisions = 10, + RevisionTransitionThreshold = 100, + ServiceType = "redis", }, Template = new ContainerAppTemplate { + InitContainers = {new ContainerAppInitContainer +{ +Image = "repo/testcontainerApp0:v4", +Name = "testinitcontainerApp0", +Command = {"/bin/sh"}, +Args = {"-c", "while true; do echo hello; sleep 10;done"}, +Resources = new AppContainerResources +{ +Cpu = 0.2, +Memory = "100Mi", +}, +}}, Containers = {new ContainerAppContainer { Probes = {new ContainerAppProbe { +HttpGet = new ContainerAppHttpRequestInfo(8080) +{ +HttpHeaders = {new ContainerAppHttpHeaderInfo("Custom-Header", "Awesome")}, +Path = "/health", +}, InitialDelaySeconds = 3, PeriodSeconds = 3, -TcpSocket = new ContainerAppTcpSocketRequestInfo(8080), ProbeType = ContainerAppProbeType.Liveness, }}, -Image = "repo/testcontainerapptcp:v1", -Name = "testcontainerapptcp", +Image = "", +ImageType = ImageType.CloudBuild, +Name = "testcontainerApp0", +VolumeMounts = {new ContainerAppVolumeMount +{ +VolumeName = "azurefile", +MountPath = "/mnt/path1", +SubPath = "subPath1", +}, new ContainerAppVolumeMount +{ +VolumeName = "nfsazurefile", +MountPath = "/mnt/path2", +SubPath = "subPath2", +}}, }}, Scale = new ContainerAppScale { @@ -472,16 +712,38 @@ public async Task CreateOrUpdate_CreateOrUpdateTcpApp() PollingInterval = 35, Rules = {new ContainerAppScaleRule { -Name = "tcpscalingrule", -Tcp = new ContainerAppTcpScaleRule +Name = "httpscalingrule", +Custom = new ContainerAppCustomScaleRule { +CustomScaleRuleType = "http", Metadata = { -["concurrentConnections"] = "50" +["concurrentRequests"] = "50" }, }, }}, }, + Volumes = {new ContainerAppVolume +{ +Name = "azurefile", +StorageType = ContainerAppStorageType.AzureFile, +StorageName = "storage", +}, new ContainerAppVolume +{ +Name = "nfsazurefile", +StorageType = ContainerAppStorageType.NfsAzureFile, +StorageName = "nfsStorage", +}}, + ServiceBinds = {new ContainerAppServiceBind +{ +ServiceId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService"), +Name = "redisService", +ClientType = "dotnet", +CustomizedKeys = +{ +["DesiredKey"] = "defaultKey" +}, +}}, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, containerAppName, data); @@ -496,9 +758,9 @@ public async Task CreateOrUpdate_CreateOrUpdateTcpApp() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateOrUpdateWorkflowAppKind() + public async Task CreateOrUpdate_CreateOrUpdateTcpApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Kind_WorkflowApp_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json // this example is just showing the usage of "ContainerApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -508,7 +770,7 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkflowAppKind() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -517,40 +779,56 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkflowAppKind() ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); // invoke the operation - string containerAppName = "testcontainerAppKind"; - ContainerAppData data = new ContainerAppData(new AzureLocation("East Us")) + string containerAppName = "testcontainerAppTcp"; + ContainerAppData data = new ContainerAppData(new AzureLocation("East US")) { - ManagedBy = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind", - Kind = ContainerAppKind.Workflowapp, - ManagedEnvironmentId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3"), + EnvironmentId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube"), Configuration = new ContainerAppConfiguration { - ActiveRevisionsMode = ContainerAppActiveRevisionsMode.Single, Ingress = new ContainerAppIngressConfiguration { External = true, - TargetPort = 443, - AllowInsecure = false, + TargetPort = 3000, + ExposedPort = 4000, + Transport = ContainerAppIngressTransportMethod.Tcp, + Traffic = {new ContainerAppRevisionTrafficWeight +{ +RevisionName = "testcontainerAppTcp-ab1234", +Weight = 100, +}}, }, }, Template = new ContainerAppTemplate { Containers = {new ContainerAppContainer { -Image = "default/logicapps-base:latest", -Name = "logicapps-container", -Resources = new AppContainerResources +Probes = {new ContainerAppProbe { -Cpu = 1, -Memory = "2.0Gi", -}, +InitialDelaySeconds = 3, +PeriodSeconds = 3, +TcpSocket = new ContainerAppTcpSocketRequestInfo(8080), +ProbeType = ContainerAppProbeType.Liveness, +}}, +Image = "repo/testcontainerAppTcp:v1", +Name = "testcontainerAppTcp", }}, Scale = new ContainerAppScale { MinReplicas = 1, - MaxReplicas = 30, + MaxReplicas = 5, CooldownPeriod = 350, PollingInterval = 35, + Rules = {new ContainerAppScaleRule +{ +Name = "tcpscalingrule", +Tcp = new ContainerAppTcpScaleRule +{ +Metadata = +{ +["concurrentConnections"] = "50" +}, +}, +}}, }, }, }; @@ -568,7 +846,7 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkflowAppKind() [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -587,7 +865,7 @@ public async Task Get_GetContainerApp() ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); // invoke the operation - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ContainerAppResource result = await collection.GetAsync(containerAppName); // the variable result is a resource, you could call other operations on this instance as well @@ -601,7 +879,7 @@ public async Task Get_GetContainerApp() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListContainerAppsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_ListByResourceGroup.json // this example is just showing the usage of "ContainerApps_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -636,7 +914,7 @@ public async Task GetAll_ListContainerAppsByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -655,7 +933,7 @@ public async Task Exists_GetContainerApp() ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); // invoke the operation - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; bool result = await collection.ExistsAsync(containerAppName); Console.WriteLine($"Succeeded: {result}"); @@ -665,7 +943,7 @@ public async Task Exists_GetContainerApp() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -684,7 +962,7 @@ public async Task GetIfExists_GetContainerApp() ContainerAppCollection collection = resourceGroupResource.GetContainerApps(); // invoke the operation - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; NullableResponse response = await collection.GetIfExistsAsync(containerAppName); ContainerAppResource result = response.HasValue ? response.Value : null; diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs index aeba08f67614..2a9218651548 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentCertificateCollectio [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCertificate() [Ignore("Only validating compilation of examples")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCertificatesByConnectedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetAll_ListCertificatesByConnectedEnvironment() [Ignore("Only validating compilation of examples")] public async Task Exists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Exists_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs index 1fddd2f507fe..963cccc2c721 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCertificateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificate_Delete.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteCertificate() [Ignore("Only validating compilation of examples")] public async Task Update_PatchCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificates_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificates_Patch.json // this example is just showing the usage of "ConnectedEnvironmentsCertificates_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs index f982a1d8ab5f..edaa00039174 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateKubeEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_CreateKubeEnvironments() [Ignore("Only validating compilation of examples")] public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_Get.json // this example is just showing the usage of "ConnectedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListEnvironmentsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_ListByResourceGroup.json // this example is just showing the usage of "ConnectedEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,7 +136,7 @@ public async Task GetAll_ListEnvironmentsByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_Get.json // this example is just showing the usage of "ConnectedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task Exists_GetConnectedEnvironmentByConnectedEnvironmentName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_Get.json // this example is just showing the usage of "ConnectedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs index cb59d87a850f..f20b0d78986c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentDaprComponentCollect [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -41,7 +41,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponent() // invoke the operation string componentName = "reddog"; - ContainerAppDaprComponentData data = new ContainerAppDaprComponentData + ConnectedEnvironmentDaprComponentData data = new ConnectedEnvironmentDaprComponentData { ComponentType = "state.azure.cosmosdb", Version = "v1", @@ -70,13 +70,23 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponent() SecretRef = "masterkey", }}, Scopes = { "container-app-1", "container-app-2" }, + ServiceComponentBind = {new DaprComponentServiceBinding +{ +Name = "statestore", +ServiceId = "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis", +Metadata = new DaprServiceBindMetadata +{ +Name = "daprcomponentBind", +Value = "redis-bind", +}, +}}, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, componentName, data); ContainerAppConnectedEnvironmentDaprComponentResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ContainerAppDaprComponentData resourceData = result.Data; + ConnectedEnvironmentDaprComponentData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -85,7 +95,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponent() [Ignore("Only validating compilation of examples")] public async Task Get_GetDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +120,7 @@ public async Task Get_GetDaprComponent() // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ContainerAppDaprComponentData resourceData = result.Data; + ConnectedEnvironmentDaprComponentData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -119,7 +129,7 @@ public async Task Get_GetDaprComponent() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDaprComponents() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_List.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +153,7 @@ public async Task GetAll_ListDaprComponents() { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ContainerAppDaprComponentData resourceData = item.Data; + ConnectedEnvironmentDaprComponentData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -155,7 +165,7 @@ public async Task GetAll_ListDaprComponents() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +195,7 @@ public async Task Exists_GetDaprComponent() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +227,7 @@ public async Task GetIfExists_GetDaprComponent() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ContainerAppDaprComponentData resourceData = result.Data; + ConnectedEnvironmentDaprComponentData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs index 71ae6977f140..9edd5a97d0fa 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentDaprComponentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentDaprComponentResourc [Ignore("Only validating compilation of examples")] public async Task Get_GetDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,7 +42,7 @@ public async Task Get_GetDaprComponent() // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ContainerAppDaprComponentData resourceData = result.Data; + ConnectedEnvironmentDaprComponentData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -51,7 +51,7 @@ public async Task Get_GetDaprComponent() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteDaprComponent() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Update_CreateOrUpdateDaprComponent() ContainerAppConnectedEnvironmentDaprComponentResource containerAppConnectedEnvironmentDaprComponent = client.GetContainerAppConnectedEnvironmentDaprComponentResource(containerAppConnectedEnvironmentDaprComponentResourceId); // invoke the operation - ContainerAppDaprComponentData data = new ContainerAppDaprComponentData + ConnectedEnvironmentDaprComponentData data = new ConnectedEnvironmentDaprComponentData { ComponentType = "state.azure.cosmosdb", Version = "v1", @@ -125,13 +125,23 @@ public async Task Update_CreateOrUpdateDaprComponent() SecretRef = "masterkey", }}, Scopes = { "container-app-1", "container-app-2" }, + ServiceComponentBind = {new DaprComponentServiceBinding +{ +Name = "statestore", +ServiceId = "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis", +Metadata = new DaprServiceBindMetadata +{ +Name = "daprcomponentBind", +Value = "redis-bind", +}, +}}, }; ArmOperation lro = await containerAppConnectedEnvironmentDaprComponent.UpdateAsync(WaitUntil.Completed, data); ContainerAppConnectedEnvironmentDaprComponentResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - ContainerAppDaprComponentData resourceData = result.Data; + ConnectedEnvironmentDaprComponentData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -140,7 +150,7 @@ public async Task Update_CreateOrUpdateDaprComponent() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ListContainerAppsSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json // this example is just showing the usage of "ConnectedEnvironmentsDaprComponents_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs index a1808da24855..2ffad50d3c7b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_Get.json // this example is just showing the usage of "ConnectedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetConnectedEnvironmentByConnectedEnvironmentName() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteConnectedEnvironmentByConnectedEnvironmentName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_Delete.json // this example is just showing the usage of "ConnectedEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_DeleteConnectedEnvironmentByConnectedEnvironmentName() [Ignore("Only validating compilation of examples")] public async Task Update_PatchManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_Patch.json // this example is just showing the usage of "ConnectedEnvironments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_PatchManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task CheckNameAvailability_CertificatesCheckNameAvailability() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json // this example is just showing the usage of "ConnectedEnvironments_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs index eecebeada4e2..6b97f89c8d56 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentStorageCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorage() [Ignore("Only validating compilation of examples")] public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_Get.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_List.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task GetAll_ListEnvironmentsStoragesBySubscription() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_Get.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_GetAEnvironmentsStoragePropertiesBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_Get.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs index 008abc3717b2..b7a4d784013f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppConnectedEnvironmentStorageResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppConnectedEnvironmentStorageResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_Get.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAEnvironmentsStoragePropertiesBySubscription() [Ignore("Only validating compilation of examples")] public async Task Delete_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_Delete.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ListEnvironmentsStoragesBySubscription() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ConnectedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorCollection.cs index 580be8180abb..324e27b0684c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppDetectorCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSDiagnosticsInfo() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsDiagnostics_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetContainerAppSDiagnosticsInfo() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheListOfAvailableDiagnosticsForAGivenContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerAppsDiagnostics_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsDiagnostics_List.json // this example is just showing the usage of "ContainerAppsDiagnostics_ListDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_GetTheListOfAvailableDiagnosticsForAGivenContainerApp() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppSDiagnosticsInfo() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsDiagnostics_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_GetContainerAppSDiagnosticsInfo() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppSDiagnosticsInfo() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsDiagnostics_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs index c53a3bae2b9d..ba9e08a89fb0 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppDetectorPropertyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRoot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task Get_GetContainerApp() // for more information of creating ContainerAppDetectorPropertyResource, please refer to the document of ContainerAppDetectorPropertyResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ResourceIdentifier containerAppDetectorPropertyResourceId = ContainerAppDetectorPropertyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppDetectorPropertyResource containerAppDetectorProperty = client.GetContainerAppDetectorPropertyResource(containerAppDetectorPropertyResourceId); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs index 783d3cf99311..3eb0a3014ccb 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppDetectorPropertyRevisionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetContainerAppSRevision() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListContainerAppSRevisions() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_List.json // this example is just showing the usage of "ContainerAppsDiagnostics_ListRevisions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_ListContainerAppSRevisions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_GetContainerAppSRevision() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs index fd47f91a8ba1..4b038085ef54 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorPropertyRevisionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppDetectorPropertyRevisionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorResource.cs index a0fd6e86b13f..5695e6cbfaa6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppDetectorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSDiagnosticsInfo() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerAppsDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsDiagnostics_Get.json // this example is just showing the usage of "ContainerAppsDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigCollection.cs index ea410686bb35..cea6ce4ac0e5 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppHttpRouteConfigCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateHttpRoute() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate.json // this example is just showing the usage of "HttpRouteConfig_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,8 @@ public async Task CreateOrUpdate_CreateOrUpdateHttpRoute() { Targets = {new ContainerAppHttpRouteTarget("capp-1") { -Revision = "capp-1--0000001", +Revision = "rev-1", +Weight = 100, }}, Routes = {new ContainerAppHttpRoute { @@ -83,7 +84,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHttpRoute() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateHttpRoutePathSeparatedPrefixRule() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_CreateOrUpdate_PathSepPrefix.json // this example is just showing the usage of "HttpRouteConfig_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +111,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHttpRoutePathSeparatedPrefixRule( { CustomDomains = {new ContainerAppCustomDomain("example.com") { -BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +BindingType = ContainerAppCustomDomainBindingType.Disabled, CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"), }}, Rules = {new ContainerAppHttpRouteRule @@ -146,7 +147,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHttpRoutePathSeparatedPrefixRule( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateHttpRoutePrefixRule() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_CreateOrUpdatePrefix.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_CreateOrUpdatePrefix.json // this example is just showing the usage of "HttpRouteConfig_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +174,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHttpRoutePrefixRule() { CustomDomains = {new ContainerAppCustomDomain("example.com") { -BindingType = ContainerAppCustomDomainBindingType.SniEnabled, +BindingType = ContainerAppCustomDomainBindingType.Disabled, CertificateId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/testcontainerenv/certificates/certificate-1"), }}, Rules = {new ContainerAppHttpRouteRule @@ -209,7 +210,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHttpRoutePrefixRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetHttpRoute() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_Get.json // this example is just showing the usage of "HttpRouteConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,9 +242,9 @@ public async Task Get_GetHttpRoute() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListHttpRouteConfigsByManagedEnvironment() + public async Task GetAll_ListManagedHttpRoutesByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_ListByManagedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_ListByManagedEnvironment.json // this example is just showing the usage of "HttpRouteConfig_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +280,7 @@ public async Task GetAll_ListHttpRouteConfigsByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task Exists_GetHttpRoute() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_Get.json // this example is just showing the usage of "HttpRouteConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -309,7 +310,7 @@ public async Task Exists_GetHttpRoute() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetHttpRoute() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_Get.json // this example is just showing the usage of "HttpRouteConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigResource.cs index 205cc45c8568..bb11b660b12b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppHttpRouteConfigResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppHttpRouteConfigResource [Ignore("Only validating compilation of examples")] public async Task Get_GetHttpRoute() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_Get.json // this example is just showing the usage of "HttpRouteConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,9 +49,9 @@ public async Task Get_GetHttpRoute() [Test] [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteAHttpRouteConfig() + public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_Delete.json // this example is just showing the usage of "HttpRouteConfig_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,9 +76,9 @@ public async Task Delete_DeleteAHttpRouteConfig() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_PatchAHttpRouteConfig() + public async Task Update_PatchManagedHttpRoute() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/HttpRouteConfig_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/HttpRouteConfig_Patch.json // this example is just showing the usage of "HttpRouteConfig_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,8 @@ public async Task Update_PatchAHttpRouteConfig() { Targets = {new ContainerAppHttpRouteTarget("capp-1") { -Revision = "capp-1--0000001", +Revision = "rev-1", +Weight = 100, }}, Routes = {new ContainerAppHttpRoute { diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobCollection.cs index 54474a14ea7d..1a86753aa35e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_ContainerAppJobCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_CreateorUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_CreateorUpdate.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -41,7 +41,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); // invoke the operation - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ContainerAppJobData data = new ContainerAppJobData(new AzureLocation("East US")) { Identity = new ManagedServiceIdentity("SystemAssigned,UserAssigned") @@ -72,14 +72,15 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() { InitContainers = {new ContainerAppInitContainer { -Image = "repo/testcontainerappsjob0:v4", +Image = "repo/testcontainerAppsJob0:v4", Name = "testinitcontainerAppsJob0", Command = {"/bin/sh"}, Args = {"-c", "while true; do echo hello; sleep 10;done"}, Resources = new AppContainerResources { -Cpu = 0.5, -Memory = "1Gi", +Cpu = 0.2, +Memory = "100Mi", +Gpu = 1, }, }}, Containers = {new ContainerAppContainer @@ -95,8 +96,8 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() PeriodSeconds = 3, ProbeType = ContainerAppProbeType.Liveness, }}, -Image = "repo/testcontainerappsjob0:v1", -Name = "testcontainerappsjob0", +Image = "repo/testcontainerAppsJob0:v1", +Name = "testcontainerAppsJob0", VolumeMounts = {new ContainerAppVolumeMount { VolumeName = "azurefile", @@ -109,16 +110,88 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() SubPath = "subPath2", }}, }}, - Volumes = {new ContainerAppVolume + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, jobName, data); + ContainerAppJobResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJobOnAConnectedEnvironment() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_CreateorUpdate_ConnectedEnvironment.json + // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerAppJobResource + ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); + + // invoke the operation + string jobName = "testcontainerAppsJob0"; + ContainerAppJobData data = new ContainerAppJobData(new AzureLocation("East US")) + { + ExtendedLocation = new ContainerAppExtendedLocation + { + Name = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation", + ExtendedLocationType = ContainerAppExtendedLocationType.CustomLocation, + }, + EnvironmentId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube", + Configuration = new ContainerAppJobConfiguration(ContainerAppJobTriggerType.Manual, 10) + { + ReplicaRetryLimit = 10, + ManualTriggerConfig = new JobConfigurationManualTriggerConfig + { + ReplicaCompletionCount = 1, + Parallelism = 4, + }, + }, + Template = new ContainerAppJobTemplate + { + InitContainers = {new ContainerAppInitContainer +{ +Image = "repo/testcontainerAppsJob0:v4", +Name = "testinitcontainerAppsJob0", +Command = {"/bin/sh"}, +Args = {"-c", "while true; do echo hello; sleep 10;done"}, +Resources = new AppContainerResources { -Name = "azurefile", -StorageType = ContainerAppStorageType.AzureFile, -StorageName = "storage", -}, new ContainerAppVolume +Cpu = 0.2, +Memory = "100Mi", +}, +}}, + Containers = {new ContainerAppContainer +{ +Probes = {new ContainerAppProbe { -Name = "nfsazurefile", -StorageType = ContainerAppStorageType.NfsAzureFile, -StorageName = "nfsStorage", +HttpGet = new ContainerAppHttpRequestInfo(8080) +{ +HttpHeaders = {new ContainerAppHttpHeaderInfo("Custom-Header", "Awesome")}, +Path = "/health", +}, +InitialDelaySeconds = 5, +PeriodSeconds = 3, +ProbeType = ContainerAppProbeType.Liveness, +}}, +Image = "repo/testcontainerAppsJob0:v1", +Name = "testcontainerAppsJob0", }}, }, }; @@ -136,7 +209,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJobWithEventDrivenTrigger() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_CreateorUpdate_EventTrigger.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_CreateorUpdate_EventTrigger.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +228,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJobWithEventDrivenTr ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); // invoke the operation - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ContainerAppJobData data = new ContainerAppJobData(new AzureLocation("East US")) { Identity = new ManagedServiceIdentity("UserAssigned") @@ -195,20 +268,20 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJobWithEventDrivenTr { InitContainers = {new ContainerAppInitContainer { -Image = "repo/testcontainerappsjob0:v4", +Image = "repo/testcontainerAppsJob0:v4", Name = "testinitcontainerAppsJob0", Command = {"/bin/sh"}, Args = {"-c", "while true; do echo hello; sleep 10;done"}, Resources = new AppContainerResources { -Cpu = 0.5, -Memory = "1Gi", +Cpu = 0.2, +Memory = "100Mi", }, }}, Containers = {new ContainerAppContainer { -Image = "repo/testcontainerappsjob0:v1", -Name = "testcontainerappsjob0", +Image = "repo/testcontainerAppsJob0:v1", +Name = "testcontainerAppsJob0", }}, }, }; @@ -226,7 +299,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppsJobWithEventDrivenTr [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +318,7 @@ public async Task Get_GetContainerAppsJob() ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); // invoke the operation - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ContainerAppJobResource result = await collection.GetAsync(jobName); // the variable result is a resource, you could call other operations on this instance as well @@ -259,7 +332,7 @@ public async Task Get_GetContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListContainerAppsJobsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Jobs_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Jobs_ListByResourceGroup.json // this example is just showing the usage of "Jobs_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -294,7 +367,7 @@ public async Task GetAll_ListContainerAppsJobsByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -313,7 +386,7 @@ public async Task Exists_GetContainerAppsJob() ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); // invoke the operation - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; bool result = await collection.ExistsAsync(jobName); Console.WriteLine($"Succeeded: {result}"); @@ -323,7 +396,7 @@ public async Task Exists_GetContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -342,7 +415,7 @@ public async Task GetIfExists_GetContainerAppsJob() ContainerAppJobCollection collection = resourceGroupResource.GetContainerAppJobs(); // invoke the operation - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; NullableResponse response = await collection.GetIfExistsAsync(jobName); ContainerAppJobResource result = response.HasValue ? response.Value : null; diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorCollection.cs index 2d9f932a5a2b..5cf7780b1668 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppJobDetectorCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDiagnosticDataForAContainerAppJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_GetDetector.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_GetDetector.json // this example is just showing the usage of "Jobs_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetDiagnosticDataForAContainerAppJob() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheListOfAvailableDiagnosticDataForAContainerAppJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_ListDetectors.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_ListDetectors.json // this example is just showing the usage of "Jobs_ListDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_GetTheListOfAvailableDiagnosticDataForAContainerAppJob( [Ignore("Only validating compilation of examples")] public async Task Exists_GetDiagnosticDataForAContainerAppJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_GetDetector.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_GetDetector.json // this example is just showing the usage of "Jobs_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_GetDiagnosticDataForAContainerAppJob() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDiagnosticDataForAContainerAppJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_GetDetector.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_GetDetector.json // this example is just showing the usage of "Jobs_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyCollection.cs index 317884bbec63..ec036341d33b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppJobDetectorPropertyCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppJobByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_ProxyGet.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_ProxyGet.json // this example is just showing the usage of "Jobs_ProxyGet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task Get_GetContainerAppJobByName() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -53,7 +53,7 @@ public async Task Get_GetContainerAppJobByName() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppJobByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_ProxyGet.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_ProxyGet.json // this example is just showing the usage of "Jobs_ProxyGet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task Exists_GetContainerAppJobByName() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -83,7 +83,7 @@ public async Task Exists_GetContainerAppJobByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppJobByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_ProxyGet.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_ProxyGet.json // this example is just showing the usage of "Jobs_ProxyGet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetIfExists_GetContainerAppJobByName() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyResource.cs index d0913a899ce3..2b08a8ba826b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorPropertyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppJobDetectorPropertyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppJobByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_ProxyGet.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_ProxyGet.json // this example is just showing the usage of "Jobs_ProxyGet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task Get_GetContainerAppJobByName() // for more information of creating ContainerAppJobDetectorPropertyResource, please refer to the document of ContainerAppJobDetectorPropertyResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; string apiName = "rootApi"; ResourceIdentifier containerAppJobDetectorPropertyResourceId = ContainerAppJobDetectorPropertyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName, apiName); ContainerAppJobDetectorPropertyResource containerAppJobDetectorProperty = client.GetContainerAppJobDetectorPropertyResource(containerAppJobDetectorPropertyResourceId); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorResource.cs index 8a07f38e70e8..564536385dd6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppJobDetectorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDiagnosticDataForAContainerAppJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_GetDetector.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_GetDetector.json // this example is just showing the usage of "Jobs_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionCollection.cs index 87bf56d895f7..00de694c83e1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppJobExecutionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetASingleJobExecution() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Execution_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Execution_Get.json // this example is just showing the usage of "JobExecution" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task Get_GetASingleJobExecution() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -53,7 +53,7 @@ public async Task Get_GetASingleJobExecution() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAContainerAppsJobExecutions() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Executions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Executions_Get.json // this example is just showing the usage of "JobsExecutions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task GetAll_GetAContainerAppsJobExecutions() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -89,7 +89,7 @@ public async Task GetAll_GetAContainerAppsJobExecutions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetASingleJobExecution() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Execution_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Execution_Get.json // this example is just showing the usage of "JobExecution" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Exists_GetASingleJobExecution() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -119,7 +119,7 @@ public async Task Exists_GetASingleJobExecution() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetASingleJobExecution() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Execution_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Execution_Get.json // this example is just showing the usage of "JobExecution" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetIfExists_GetASingleJobExecution() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionResource.cs index 164ba305034d..295205dde021 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobExecutionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppJobExecutionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetASingleJobExecution() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Execution_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Execution_Get.json // this example is just showing the usage of "JobExecution" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task Get_GetASingleJobExecution() // for more information of creating ContainerAppJobExecutionResource, please refer to the document of ContainerAppJobExecutionResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; string jobExecutionName = "jobExecution1"; ResourceIdentifier containerAppJobExecutionResourceId = ContainerAppJobExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName, jobExecutionName); ContainerAppJobExecutionResource containerAppJobExecution = client.GetContainerAppJobExecutionResource(containerAppJobExecutionResourceId); @@ -50,7 +50,7 @@ public async Task Get_GetASingleJobExecution() [Ignore("Only validating compilation of examples")] public async Task StopExecutionJob_TerminateAContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Stop_Execution.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Stop_Execution.json // this example is just showing the usage of "Jobs_StopExecution" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task StopExecutionJob_TerminateAContainerAppsJob() // for more information of creating ContainerAppJobExecutionResource, please refer to the document of ContainerAppJobExecutionResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; string jobExecutionName = "jobExecution1"; ResourceIdentifier containerAppJobExecutionResourceId = ContainerAppJobExecutionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName, jobExecutionName); ContainerAppJobExecutionResource containerAppJobExecution = client.GetContainerAppJobExecutionResource(containerAppJobExecutionResourceId); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobResource.cs index 67c4ded1efb3..ffd606ae2c8b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppJobResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppJobResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Get.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,7 +32,7 @@ public async Task Get_GetContainerAppsJob() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -50,7 +50,7 @@ public async Task Get_GetContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Delete.json // this example is just showing the usage of "Jobs_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task Delete_DeleteContainerAppsJob() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testworkercontainerappsjob0"; + string jobName = "testWorkerContainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -76,7 +76,7 @@ public async Task Delete_DeleteContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task Update_PatchContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Patch.json // this example is just showing the usage of "Jobs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_PatchContainerAppsJob() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -110,14 +110,14 @@ public async Task Update_PatchContainerAppsJob() { InitContainers = {new ContainerAppInitContainer { -Image = "repo/testcontainerappsjob0:v4", +Image = "repo/testcontainerAppsJob0:v4", Name = "testinitcontainerAppsJob0", Command = {"/bin/sh"}, Args = {"-c", "while true; do echo hello; sleep 10;done"}, Resources = new AppContainerResources { -Cpu = 0.5, -Memory = "1Gi", +Cpu = 0.2, +Memory = "100Mi", }, }}, Containers = {new ContainerAppContainer @@ -133,8 +133,8 @@ public async Task Update_PatchContainerAppsJob() PeriodSeconds = 3, ProbeType = ContainerAppProbeType.Liveness, }}, -Image = "repo/testcontainerappsjob0:v1", -Name = "testcontainerappsjob0", +Image = "repo/testcontainerAppsJob0:v1", +Name = "testcontainerAppsJob0", }}, }, }, @@ -153,7 +153,7 @@ public async Task Update_PatchContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task Start_RunAContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Start.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Start.json // this example is just showing the usage of "Jobs_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task Start_RunAContainerAppsJob() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -174,24 +174,24 @@ public async Task Start_RunAContainerAppsJob() { Containers = {new JobExecutionContainer { -Image = "repo/testcontainerappsjob0:v4", -Name = "testcontainerappsjob0", +Image = "repo/testcontainerAppsJob0:v4", +Name = "testcontainerAppsJob0", Resources = new AppContainerResources { -Cpu = 0.5, -Memory = "1Gi", +Cpu = 0.2, +Memory = "100Mi", }, }}, InitContainers = {new JobExecutionContainer { -Image = "repo/testcontainerappsjob0:v4", +Image = "repo/testcontainerAppsJob0:v4", Name = "testinitcontainerAppsJob0", Command = {"/bin/sh"}, Args = {"-c", "while true; do echo hello; sleep 10;done"}, Resources = new AppContainerResources { -Cpu = 0.5, -Memory = "1Gi", +Cpu = 0.2, +Memory = "100Mi", }, }}, }; @@ -205,7 +205,7 @@ public async Task Start_RunAContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task StopMultipleExecutions_TerminateMultipleContainerAppsJob() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_Stop_Multiple.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_Stop_Multiple.json // this example is just showing the usage of "Jobs_StopMultipleExecutions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +217,7 @@ public async Task StopMultipleExecutions_TerminateMultipleContainerAppsJob() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -232,7 +232,7 @@ public async Task StopMultipleExecutions_TerminateMultipleContainerAppsJob() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ListContainerAppsJobSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Job_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Job_ListSecrets.json // this example is just showing the usage of "Jobs_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +244,7 @@ public async Task GetSecrets_ListContainerAppsJobSecrets() // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string jobName = "testcontainerappsjob0"; + string jobName = "testcontainerAppsJob0"; ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); @@ -256,5 +256,67 @@ public async Task GetSecrets_ListContainerAppsJobSecrets() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Resume_ResumeJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Jobs_Resume.json + // this example is just showing the usage of "Jobs_Resume" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + ArmOperation lro = await containerAppJob.ResumeAsync(WaitUntil.Completed); + ContainerAppJobResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Suspend_SuspendJob() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Jobs_Suspend.json + // this example is just showing the usage of "Jobs_Suspend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppJobResource created on azure + // for more information of creating ContainerAppJobResource, please refer to the document of ContainerAppJobResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string jobName = "testcontainerAppsJob0"; + ResourceIdentifier containerAppJobResourceId = ContainerAppJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, jobName); + ContainerAppJobResource containerAppJob = client.GetContainerAppJobResource(containerAppJobResourceId); + + // invoke the operation + ArmOperation lro = await containerAppJob.SuspendAsync(WaitUntil.Completed); + ContainerAppJobResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationCollection.cs index 13d95425647a..f2c75230e15f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppMaintenanceConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ManagedEnvironmentMaintenanceConfigurationsCreateOrUpdate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_CreateOrUpdate.json // this example is just showing the usage of "MaintenanceConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_ManagedEnvironmentMaintenanceConfigurationsCrea [Ignore("Only validating compilation of examples")] public async Task Get_ManagedEnvironmentMaintenanceConfigurationsGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json // this example is just showing the usage of "MaintenanceConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ManagedEnvironmentMaintenanceConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ManagedEnvironmentMaintenanceConfigurationsList() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_List.json // this example is just showing the usage of "MaintenanceConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ManagedEnvironmentMaintenanceConfigurationsList() [Ignore("Only validating compilation of examples")] public async Task Exists_ManagedEnvironmentMaintenanceConfigurationsGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json // this example is just showing the usage of "MaintenanceConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_ManagedEnvironmentMaintenanceConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ManagedEnvironmentMaintenanceConfigurationsGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json // this example is just showing the usage of "MaintenanceConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationResource.cs index 336f434679ee..702ef659fcbe 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppMaintenanceConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppMaintenanceConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_ManagedEnvironmentMaintenanceConfigurationsGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_Get.json // this example is just showing the usage of "MaintenanceConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_ManagedEnvironmentMaintenanceConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ManagedEnvironmentMaintenanceConfigurationsDelete() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_Delete.json // this example is just showing the usage of "MaintenanceConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ManagedEnvironmentMaintenanceConfigurationsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ManagedEnvironmentMaintenanceConfigurationsCreateOrUpdate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironment_MaintenanceConfigurations_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironment_MaintenanceConfigurations_CreateOrUpdate.json // this example is just showing the usage of "MaintenanceConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs index 0eb31137333e..b2b2f5e27f9f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedCertificateCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificate_CreateOrUpdate.json // this example is just showing the usage of "ManagedCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCertificate() [Ignore("Only validating compilation of examples")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificate_Get.json // this example is just showing the usage of "ManagedCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedCertificatesByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificates_ListByManagedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificates_ListByManagedEnvironment.json // this example is just showing the usage of "ManagedCertificates_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetAll_ListManagedCertificatesByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task Exists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificate_Get.json // this example is just showing the usage of "ManagedCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificate_Get.json // this example is just showing the usage of "ManagedCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs index c608e2d192a9..39d7094b9880 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedCertificateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificate_Get.json // this example is just showing the usage of "ManagedCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificate_Delete.json // this example is just showing the usage of "ManagedCertificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteCertificate() [Ignore("Only validating compilation of examples")] public async Task Update_PatchManagedCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedCertificates_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedCertificates_Patch.json // this example is just showing the usage of "ManagedCertificates_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs index b9500eed8093..b32b61b93b7a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerAppManagedEnvironmentCertificateCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificate_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificate_CreateOrUpdate.json // this example is just showing the usage of "Certificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,6 +48,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCertificate() { Password = "private key password", Value = Encoding.UTF8.GetBytes("Y2VydA=="), + CertificateType = CertificateType.ImagePullTrustedCA, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, certificateName, data); @@ -64,7 +65,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCertificate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateCertificateUsingManagedIdentity() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificate_CreateOrUpdate_FromKeyVault.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificate_CreateOrUpdate_FromKeyVault.json // this example is just showing the usage of "Certificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,6 +95,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCertificateUsingManagedIdentity() Identity = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi", KeyVaultUri = new Uri("https://xxxxxxxx.vault.azure.net/certificates/certName"), }, + CertificateType = CertificateType.ServerSSLCertificate, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, certificateName, data); @@ -110,7 +112,7 @@ public async Task CreateOrUpdate_CreateOrUpdateCertificateUsingManagedIdentity() [Ignore("Only validating compilation of examples")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificate_Get.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +146,7 @@ public async Task Get_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCertificatesByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificates_ListByManagedEnvironment.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificates_ListByManagedEnvironment.json // this example is just showing the usage of "Certificates_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +182,7 @@ public async Task GetAll_ListCertificatesByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task Exists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificate_Get.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +212,7 @@ public async Task Exists_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificate_Get.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs index 18d4428099de..732535cec30d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCertificateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedEnvironmentCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificate_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificate_Get.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetCertificate() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificate_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificate_Delete.json // this example is just showing the usage of "Certificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteCertificate() [Ignore("Only validating compilation of examples")] public async Task Update_PatchCertificate() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificates_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificates_Patch.json // this example is just showing the usage of "Certificates_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs index 956b01351921..11d8a1d7218b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ContainerAppManagedEnvironmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateEnvironmentWithCustomInfrastructureResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json // this example is just showing the usage of "ManagedEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,6 +59,7 @@ public async Task CreateOrUpdate_CreateEnvironmentWithCustomInfrastructureResour }, }, IsZoneRedundant = true, + AvailabilityZones = { "1", "2", "3" }, CustomDomainConfiguration = new ContainerAppCustomDomainConfiguration { DnsSuffix = "www.my-name.com", @@ -67,6 +68,7 @@ public async Task CreateOrUpdate_CreateEnvironmentWithCustomInfrastructureResour }, WorkloadProfiles = {new ContainerAppWorkloadProfile("My-GP-01", "GeneralPurpose") { +EnableFips = true, MinimumNodeCount = 3, MaximumNodeCount = 12, }, new ContainerAppWorkloadProfile("My-MO-01", "MemoryOptimized") @@ -94,7 +96,7 @@ public async Task CreateOrUpdate_CreateEnvironmentWithCustomInfrastructureResour [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_CreateOrUpdate.json // this example is just showing the usage of "ManagedEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,9 +136,45 @@ public async Task CreateOrUpdate_CreateEnvironments() { CustomerId = "string", SharedKey = "string", + DynamicJsonColumns = true, + }, + }, + AppInsightsConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/", + OpenTelemetryConfiguration = new OpenTelemetryConfiguration + { + DestinationsConfiguration = new DestinationsConfiguration + { + DataDogConfiguration = new DataDogConfiguration + { + Site = "string", + Key = "000000000000000000000000", + }, + OtlpConfigurations = {new OtlpConfiguration +{ +Name = "dashboard", +Endpoint = "dashboard.k8s.region.azurecontainerapps.io:80", +Insecure = true, +Headers = {new Header +{ +Key = "api-key", +Value = "xxxxxxxxxxx", +}}, +}}, + }, + TracesConfiguration = new TracesConfiguration + { + IncludeDapr = true, + Destinations = { "appInsights" }, + }, + LogsDestinations = { "appInsights" }, + MetricsConfiguration = new MetricsConfiguration + { + IncludeKeda = true, + Destinations = { "dataDog" }, }, }, IsZoneRedundant = true, + AvailabilityZones = { "1", "2", "3" }, CustomDomainConfiguration = new ContainerAppCustomDomainConfiguration { DnsSuffix = "www.my-name.com", @@ -145,6 +183,7 @@ public async Task CreateOrUpdate_CreateEnvironments() }, WorkloadProfiles = {new ContainerAppWorkloadProfile("My-GP-01", "GeneralPurpose") { +EnableFips = true, MinimumNodeCount = 3, MaximumNodeCount = 12, }, new ContainerAppWorkloadProfile("My-MO-01", "MemoryOptimized") @@ -157,14 +196,24 @@ public async Task CreateOrUpdate_CreateEnvironments() MaximumNodeCount = 6, }, new ContainerAppWorkloadProfile("My-consumption-01", "Consumption")}, IsMtlsEnabled = true, - IsEnabled = true, + IsPeerToPeerEncryptionEnabled = true, IngressConfiguration = new ManagedEnvironmentIngressConfiguration { WorkloadProfileName = "My-CO-01", + Scale = new IngressConfigurationScale + { + MinReplicas = 2, + MaxReplicas = 4, + }, TerminationGracePeriodSeconds = 3600, HeaderCountLimit = 30, RequestIdleTimeout = 5, }, + DiskEncryptionKeyVaultConfiguration = new DiskEncryptionConfigurationKeyVaultConfiguration + { + KeyUri = new Uri("https://contoso.vault.azure.net/mykey/19ff8313ca394b89b9e824bbbdc8c521"), + AuthIdentity = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity"), + }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, environmentName, data); ContainerAppManagedEnvironmentResource result = lro.Value; @@ -180,7 +229,7 @@ public async Task CreateOrUpdate_CreateEnvironments() [Ignore("Only validating compilation of examples")] public async Task Get_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +262,7 @@ public async Task Get_GetEnvironmentsByName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListEnvironmentsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_ListByResourceGroup.json // this example is just showing the usage of "ManagedEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -248,7 +297,7 @@ public async Task GetAll_ListEnvironmentsByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -277,7 +326,7 @@ public async Task Exists_GetEnvironmentsByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs index 17495396593d..c3200ffd2e9f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDaprComponentCollectio [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -66,6 +66,16 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecretStoreCompo SecretRef = "masterkey", }}, Scopes = { "container-app-1", "container-app-2" }, + ServiceComponentBind = {new DaprComponentServiceBinding +{ +Name = "statestore", +ServiceId = "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis", +Metadata = new DaprServiceBindMetadata +{ +Name = "daprcomponentBind", +Value = "redis-bind", +}, +}}, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, componentName, data); ContainerAppManagedEnvironmentDaprComponentResource result = lro.Value; @@ -81,7 +91,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecretStoreCompo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,6 +141,16 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecrets() SecretRef = "masterkey", }}, Scopes = { "container-app-1", "container-app-2" }, + ServiceComponentBind = {new DaprComponentServiceBinding +{ +Name = "statestore", +ServiceId = "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis", +Metadata = new DaprServiceBindMetadata +{ +Name = "daprcomponentBind", +Value = "redis-bind", +}, +}}, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, componentName, data); ContainerAppManagedEnvironmentDaprComponentResource result = lro.Value; @@ -146,7 +166,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDaprComponentWithSecrets() [Ignore("Only validating compilation of examples")] public async Task Get_GetDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +200,7 @@ public async Task Get_GetDaprComponentWithSecretStoreComponent() [Ignore("Only validating compilation of examples")] public async Task Get_GetDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_Secrets.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +234,7 @@ public async Task Get_GetDaprComponentWithSecrets() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDaprComponents() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_List.json // this example is just showing the usage of "DaprComponents_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -250,7 +270,7 @@ public async Task GetAll_ListDaprComponents() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -280,7 +300,7 @@ public async Task Exists_GetDaprComponentWithSecretStoreComponent() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_Secrets.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -310,7 +330,7 @@ public async Task Exists_GetDaprComponentWithSecrets() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -352,7 +372,7 @@ public async Task GetIfExists_GetDaprComponentWithSecretStoreComponent() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_Secrets.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs index 7297190b3461..bb466c762205 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDaprComponentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDaprComponentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetDaprComponentWithSecretStoreComponent() [Ignore("Only validating compilation of examples")] public async Task Get_GetDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Get_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Get_Secrets.json // this example is just showing the usage of "DaprComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_GetDaprComponentWithSecrets() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteDaprComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_Delete.json // this example is just showing the usage of "DaprComponents_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_DeleteDaprComponent() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateDaprComponentWithSecretStoreComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,6 +152,16 @@ public async Task Update_CreateOrUpdateDaprComponentWithSecretStoreComponent() SecretRef = "masterkey", }}, Scopes = { "container-app-1", "container-app-2" }, + ServiceComponentBind = {new DaprComponentServiceBinding +{ +Name = "statestore", +ServiceId = "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis", +Metadata = new DaprServiceBindMetadata +{ +Name = "daprcomponentBind", +Value = "redis-bind", +}, +}}, }; ArmOperation lro = await containerAppManagedEnvironmentDaprComponent.UpdateAsync(WaitUntil.Completed, data); ContainerAppManagedEnvironmentDaprComponentResource result = lro.Value; @@ -167,7 +177,7 @@ public async Task Update_CreateOrUpdateDaprComponentWithSecretStoreComponent() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateDaprComponentWithSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json // this example is just showing the usage of "DaprComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,6 +224,16 @@ public async Task Update_CreateOrUpdateDaprComponentWithSecrets() SecretRef = "masterkey", }}, Scopes = { "container-app-1", "container-app-2" }, + ServiceComponentBind = {new DaprComponentServiceBinding +{ +Name = "statestore", +ServiceId = "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis", +Metadata = new DaprServiceBindMetadata +{ +Name = "daprcomponentBind", +Value = "redis-bind", +}, +}}, }; ArmOperation lro = await containerAppManagedEnvironmentDaprComponent.UpdateAsync(WaitUntil.Completed, data); ContainerAppManagedEnvironmentDaprComponentResource result = lro.Value; @@ -229,7 +249,7 @@ public async Task Update_CreateOrUpdateDaprComponentWithSecrets() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ListContainerAppsSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/DaprComponents_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponents_ListSecrets.json // this example is just showing the usage of "DaprComponents_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs index d2de6355d733..9def8c4721ca 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDetectorCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentDiagnostics_Get.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetDiagnosticDataForAManagedEnvironments() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentDiagnostics_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentDiagnostics_List.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_ListDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_GetTheListOfAvailableDiagnosticDataForAManagedEnvironme [Ignore("Only validating compilation of examples")] public async Task Exists_GetDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentDiagnostics_Get.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_GetDiagnosticDataForAManagedEnvironments() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentDiagnostics_Get.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs index 1a9039c193d1..99ff06b70c9e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDetectorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDiagnosticDataForAManagedEnvironments() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentDiagnostics_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentDiagnostics_Get.json // this example is just showing the usage of "ManagedEnvironmentDiagnostics_GetDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs index f1728385cfa1..887f030909ec 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentDetectorResourcePropertyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppManagedEnvironmentDetectorResourceProper [Ignore("Only validating compilation of examples")] public async Task Get_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironmentsDiagnostics_GetRoot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs index d6b484e46cea..bc80371383f9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedEnvironmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetEnvironmentsByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_Get.json // this example is just showing the usage of "ManagedEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetEnvironmentsByName() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteEnvironmentByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_Delete.json // this example is just showing the usage of "ManagedEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_DeleteEnvironmentByName() [Ignore("Only validating compilation of examples")] public async Task Update_PatchManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_Patch.json // this example is just showing the usage of "ManagedEnvironments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_PatchManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task GetAuthToken_GetManagedEnvironmentAuthToken() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_GetAuthToken.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_GetAuthToken.json // this example is just showing the usage of "ManagedEnvironments_GetAuthToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task GetAuthToken_GetManagedEnvironmentAuthToken() [Ignore("Only validating compilation of examples")] public async Task GetWorkloadProfileStates_ListEnvironmentsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json // this example is just showing the usage of "ManagedEnvironments_ListWorkloadProfileStates" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetWorkloadProfileStates_ListEnvironmentsBySubscription() [Ignore("Only validating compilation of examples")] public async Task CheckContainerAppNameAvailability_CertificatesCheckNameAvailability() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Certificates_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Certificates_CheckNameAvailability.json // this example is just showing the usage of "Namespaces_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task CheckContainerAppNameAvailability_CertificatesCheckNameAvailab [Ignore("Only validating compilation of examples")] public async Task CheckContainerAppNameAvailability_ContainerAppsCheckNameAvailability() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_CheckNameAvailability.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_CheckNameAvailability.json // this example is just showing the usage of "Namespaces_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task CheckContainerAppNameAvailability_ContainerAppsCheckNameAvaila [Ignore("Only validating compilation of examples")] public async Task GetManagedEnvironmentPrivateLinkResources_ListPrivateLinkResourcesByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateLinkResources_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateLinkResources_List.json // this example is just showing the usage of "ManagedEnvironmentPrivateLinkResources_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,7 +261,7 @@ public async Task GetManagedEnvironmentPrivateLinkResources_ListPrivateLinkResou [Ignore("Only validating compilation of examples")] public async Task GetManagedEnvironmentUsages_ListManagedEnvironmentUsages() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentUsages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentUsages_List.json // this example is just showing the usage of "ManagedEnvironmentUsages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs index 443dd454f694..1302654b40b9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedEnvironmentStorageCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ManagedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorage() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorageForNFSAzureFile() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json // this example is just showing the usage of "ManagedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task CreateOrUpdate_CreateOrUpdateEnvironmentsStorageForNFSAzureFil [Ignore("Only validating compilation of examples")] public async Task Get_GetAEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +149,7 @@ public async Task Get_GetAEnvironmentsStorage() [Ignore("Only validating compilation of examples")] public async Task Get_GetAEnvironmentsStorageForNFSAzureFile() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task Get_GetAEnvironmentsStorageForNFSAzureFile() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_List.json // this example is just showing the usage of "ManagedEnvironmentsStorages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,7 +219,7 @@ public async Task GetAll_ListEnvironmentsStoragesBySubscription() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +249,7 @@ public async Task Exists_GetAEnvironmentsStorage() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAEnvironmentsStorageForNFSAzureFile() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +279,7 @@ public async Task Exists_GetAEnvironmentsStorageForNFSAzureFile() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +321,7 @@ public async Task GetIfExists_GetAEnvironmentsStorage() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAEnvironmentsStorageForNFSAzureFile() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs index 8bc44c252dee..1afda14b2260 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppManagedEnvironmentStorageResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppManagedEnvironmentStorageResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAEnvironmentsStorage() [Ignore("Only validating compilation of examples")] public async Task Get_GetAEnvironmentsStorageForNFSAzureFile() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_GetAEnvironmentsStorageForNFSAzureFile() [Ignore("Only validating compilation of examples")] public async Task Delete_ListEnvironmentsStoragesBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_Delete.json // this example is just showing the usage of "ManagedEnvironmentsStorages_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_ListEnvironmentsStoragesBySubscription() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateEnvironmentsStorage() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json // this example is just showing the usage of "ManagedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task Update_CreateOrUpdateEnvironmentsStorage() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateEnvironmentsStorageForNFSAzureFile() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json // this example is just showing the usage of "ManagedEnvironmentsStorages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionCollection.cs index f40fa0d1f36e..a3596a4b6760 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAPrivateEndpointConnectionByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_UpdateAPrivateEndpointConnectionByManagedEnviro [Ignore("Only validating compilation of examples")] public async Task Get_GetAPrivateEndpointConnectionByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_GetAPrivateEndpointConnectionByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPrivateEndpointConnectionsByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_List.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetAll_ListPrivateEndpointConnectionsByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAPrivateEndpointConnectionByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAPrivateEndpointConnectionByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAPrivateEndpointConnectionByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionResource.cs index e68ce2420fee..2c290e2946ab 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAPrivateEndpointConnectionByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAPrivateEndpointConnectionByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAPrivateEndpointConnectionByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Delete.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteAPrivateEndpointConnectionByManagedEnvironment() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAPrivateEndpointConnectionByManagedEnvironment() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json // this example is just showing the usage of "ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaCollection.cs index 69ab33888799..dfbbc7414d8c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppReplicaCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSRevisionReplica() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Replicas_Get.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_GetReplica" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetContainerAppSRevisionReplica() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListContainerAppSReplicas() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Replicas_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Replicas_List.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_ListReplicas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task GetAll_ListContainerAppSReplicas() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppSRevisionReplica() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Replicas_Get.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_GetReplica" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetContainerAppSRevisionReplica() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppSRevisionReplica() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Replicas_Get.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_GetReplica" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaResource.cs index 00268c4df4da..09842c954a0e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppReplicaResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppReplicaResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSRevisionReplica() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Replicas_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Replicas_Get.json // this example is just showing the usage of "ContainerAppsRevisionReplicas_GetReplica" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppResource.cs index c8fd8903d15e..5cfb175684aa 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Get.json // this example is just showing the usage of "ContainerApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,7 +32,7 @@ public async Task Get_GetContainerApp() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); @@ -50,7 +50,7 @@ public async Task Get_GetContainerApp() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Delete.json // this example is just showing the usage of "ContainerApps_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task Delete_DeleteContainerApp() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testworkerapp0"; + string containerAppName = "testWorkerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); @@ -76,7 +76,7 @@ public async Task Delete_DeleteContainerApp() [Ignore("Only validating compilation of examples")] public async Task Update_PatchContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Patch.json // this example is just showing the usage of "ContainerApps_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_PatchContainerApp() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); @@ -103,7 +103,7 @@ public async Task Update_PatchContainerApp() TargetPort = 3000, Traffic = {new ContainerAppRevisionTrafficWeight { -RevisionName = "testcontainerapp0-ab1234", +RevisionName = "testcontainerApp0-ab1234", Weight = 100, Label = "production", }}, @@ -144,20 +144,33 @@ public async Task Update_PatchContainerApp() }, MaxConcurrency = 10, }, - EnableMetrics = true, + Runtime = new Runtime + { + Java = new RuntimeJava + { + EnableMetrics = true, + JavaAgent = new RuntimeJavaAgent + { + IsEnabled = true, + LoggingLoggerSettings = { new LoggerSetting("org.springframework.boot", Level.Debug) }, + }, + }, + AutoConfigureDataProtection = true, + }, MaxInactiveRevisions = 10, + RevisionTransitionThreshold = 100, ServiceType = "redis", }, Template = new ContainerAppTemplate { InitContainers = {new ContainerAppInitContainer { -Image = "repo/testcontainerapp0:v4", +Image = "repo/testcontainerApp0:v4", Name = "testinitcontainerApp0", Resources = new AppContainerResources { -Cpu = 0.5, -Memory = "1Gi", +Cpu = 0.2, +Memory = "100Mi", }, }}, Containers = {new ContainerAppContainer @@ -173,8 +186,8 @@ public async Task Update_PatchContainerApp() PeriodSeconds = 3, ProbeType = ContainerAppProbeType.Liveness, }}, -Image = "repo/testcontainerapp0:v1", -Name = "testcontainerapp0", +Image = "repo/testcontainerApp0:v1", +Name = "testcontainerApp0", }}, Scale = new ContainerAppScale { @@ -199,6 +212,11 @@ public async Task Update_PatchContainerApp() { ServiceId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service"), Name = "service", +ClientType = "dotnet", +CustomizedKeys = +{ +["DesiredKey"] = "defaultKey" +}, }}, }, Tags = @@ -221,7 +239,7 @@ public async Task Update_PatchContainerApp() [Ignore("Only validating compilation of examples")] public async Task GetCustomHostNameAnalysis_AnalyzeCustomHostname() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json // this example is just showing the usage of "ContainerApps_ListCustomHostNameAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +251,7 @@ public async Task GetCustomHostNameAnalysis_AnalyzeCustomHostname() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); @@ -248,7 +266,7 @@ public async Task GetCustomHostNameAnalysis_AnalyzeCustomHostname() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ListContainerAppsSecrets() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_ListSecrets.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_ListSecrets.json // this example is just showing the usage of "ContainerApps_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -260,7 +278,7 @@ public async Task GetSecrets_ListContainerAppsSecrets() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); @@ -277,7 +295,7 @@ public async Task GetSecrets_ListContainerAppsSecrets() [Ignore("Only validating compilation of examples")] public async Task GetAuthToken_GetContainerAppAuthToken() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_GetAuthToken.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_GetAuthToken.json // this example is just showing the usage of "ContainerApps_GetAuthToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -289,7 +307,7 @@ public async Task GetAuthToken_GetContainerAppAuthToken() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; string resourceGroupName = "rg"; - string containerAppName = "testcontainerapp0"; + string containerAppName = "testcontainerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); @@ -303,7 +321,7 @@ public async Task GetAuthToken_GetContainerAppAuthToken() [Ignore("Only validating compilation of examples")] public async Task Start_StartContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Start.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Start.json // this example is just showing the usage of "ContainerApps_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -315,7 +333,7 @@ public async Task Start_StartContainerApp() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testworkerapp0"; + string containerAppName = "testWorkerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); @@ -334,7 +352,7 @@ public async Task Start_StartContainerApp() [Ignore("Only validating compilation of examples")] public async Task Stop_StopContainerApp() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_Stop.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_Stop.json // this example is just showing the usage of "ContainerApps_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -346,7 +364,7 @@ public async Task Stop_StopContainerApp() // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; string resourceGroupName = "rg"; - string containerAppName = "testworkerApp0"; + string containerAppName = "testWorkerApp0"; ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionCollection.cs index 9e81ccbde5e9..a0aadb4d4fed 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppRevisionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetContainerAppSRevision() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListContainerAppSRevisions() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_List.json // this example is just showing the usage of "ContainerAppsRevisions_ListRevisions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_ListContainerAppSRevisions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_GetContainerAppSRevision() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionResource.cs index 00712950cd18..17d363b6356f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppRevisionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerAppRevisionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Get.json // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetContainerAppSRevision() [Ignore("Only validating compilation of examples")] public async Task ActivateRevision_ActivateContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Activate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Activate.json // this example is just showing the usage of "ContainerAppsRevisions_ActivateRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task ActivateRevision_ActivateContainerAppSRevision() [Ignore("Only validating compilation of examples")] public async Task DeactivateRevision_DeactivateContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Deactivate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Deactivate.json // this example is just showing the usage of "ContainerAppsRevisions_DeactivateRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task DeactivateRevision_DeactivateContainerAppSRevision() [Ignore("Only validating compilation of examples")] public async Task RestartRevision_RestartContainerAppSRevision() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Revisions_Restart.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Revisions_Restart.json // this example is just showing the usage of "ContainerAppsRevisions_RestartRevision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,5 +126,33 @@ public async Task RestartRevision_RestartContainerAppSRevision() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task InvokeFunctionsHostFunctionsExtension_InvokeFunctionsHostUsingFunctionsExtensionAPI() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/FunctionsExtension_Post.json + // this example is just showing the usage of "FunctionsExtension_InvokeFunctionsHost" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppRevisionResource created on azure + // for more information of creating ContainerAppRevisionResource, please refer to the document of ContainerAppRevisionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testcontainerApp0"; + string revisionName = "testcontainerApp0-pjxhsye"; + ResourceIdentifier containerAppRevisionResourceId = ContainerAppRevisionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, revisionName); + ContainerAppRevisionResource containerAppRevision = client.GetContainerAppRevisionResource(containerAppRevisionResourceId); + + // invoke the operation + string functionAppName = "testcontainerApp0"; + string result = await containerAppRevision.InvokeFunctionsHostFunctionsExtensionAsync(functionAppName); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs index bf1734306b6c..615be2661805 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppSourceControlCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateContainerAppSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsSourceControls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,11 +61,14 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppSourceControl() Kind = "feaderated", }, ContextPath = "./", + DockerfilePath = "./Dockerfile", GitHubPersonalAccessToken = "test", Image = "image/tag", + BuildEnvironmentVariables = { new EnvironmentVariable("foo1", "bar1"), new EnvironmentVariable("foo2", "bar2") }, }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sourceControlName, data); + string xMsGitHubAuxiliary = "githubaccesstoken"; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sourceControlName, data, xMsGitHubAuxiliary: xMsGitHubAuxiliary); ContainerAppSourceControlResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -79,7 +82,7 @@ public async Task CreateOrUpdate_CreateOrUpdateContainerAppSourceControl() [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_Get.json // this example is just showing the usage of "ContainerAppsSourceControls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +116,7 @@ public async Task Get_GetContainerAppSSourceControl() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAppSSourceControls() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_ListByContainer.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_ListByContainer.json // this example is just showing the usage of "ContainerAppsSourceControls_ListByContainerApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +152,7 @@ public async Task GetAll_ListAppSSourceControls() [Ignore("Only validating compilation of examples")] public async Task Exists_GetContainerAppSSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_Get.json // this example is just showing the usage of "ContainerAppsSourceControls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,7 +182,7 @@ public async Task Exists_GetContainerAppSSourceControl() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetContainerAppSSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_Get.json // this example is just showing the usage of "ContainerAppsSourceControls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlResource.cs index f8a4b8f3d852..d10e6af1828e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppSourceControlResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerAppSourceControlResource [Ignore("Only validating compilation of examples")] public async Task Get_GetContainerAppSSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_Get.json // this example is just showing the usage of "ContainerAppsSourceControls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetContainerAppSSourceControl() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteContainerAppSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_Delete.json // this example is just showing the usage of "ContainerAppsSourceControls_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -69,7 +69,10 @@ public async Task Delete_DeleteContainerAppSourceControl() ContainerAppSourceControlResource containerAppSourceControl = client.GetContainerAppSourceControlResource(containerAppSourceControlResourceId); // invoke the operation - await containerAppSourceControl.DeleteAsync(WaitUntil.Completed); + string xMsGitHubAuxiliary = "githubaccesstoken"; + bool? ignoreWorkflowDeletionFailure = false; + bool? deleteWorkflow = false; + await containerAppSourceControl.DeleteAsync(WaitUntil.Completed, xMsGitHubAuxiliary: xMsGitHubAuxiliary, ignoreWorkflowDeletionFailure: ignoreWorkflowDeletionFailure, deleteWorkflow: deleteWorkflow); Console.WriteLine("Succeeded"); } @@ -78,7 +81,7 @@ public async Task Delete_DeleteContainerAppSourceControl() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateContainerAppSourceControl() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SourceControls_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SourceControls_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsSourceControls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,11 +119,14 @@ public async Task Update_CreateOrUpdateContainerAppSourceControl() Kind = "feaderated", }, ContextPath = "./", + DockerfilePath = "./Dockerfile", GitHubPersonalAccessToken = "test", Image = "image/tag", + BuildEnvironmentVariables = { new EnvironmentVariable("foo1", "bar1"), new EnvironmentVariable("foo2", "bar2") }, }, }; - ArmOperation lro = await containerAppSourceControl.UpdateAsync(WaitUntil.Completed, data); + string xMsGitHubAuxiliary = "githubaccesstoken"; + ArmOperation lro = await containerAppSourceControl.UpdateAsync(WaitUntil.Completed, data, xMsGitHubAuxiliary: xMsGitHubAuxiliary); ContainerAppSourceControlResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsBuildResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsBuildResource.cs new file mode 100644 index 000000000000..749955290b85 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsBuildResource.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppsBuildResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ContainerAppsBuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsBuilds_Get.json + // this example is just showing the usage of "ContainerAppsBuilds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppsBuildResource created on azure + // for more information of creating ContainerAppsBuildResource, please refer to the document of ContainerAppsBuildResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "testCapp"; + string buildName = "testBuild"; + ResourceIdentifier containerAppsBuildResourceId = ContainerAppsBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, buildName); + ContainerAppsBuildResource containerAppsBuildResource = client.GetContainerAppsBuildResource(containerAppsBuildResourceId); + + // invoke the operation + ContainerAppsBuildResource result = await containerAppsBuildResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsBuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ContainerAppsBuildsDelete0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsBuilds_Delete.json + // this example is just showing the usage of "ContainerAppsBuilds_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppsBuildResource created on azure + // for more information of creating ContainerAppsBuildResource, please refer to the document of ContainerAppsBuildResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "testCapp"; + string buildName = "testBuild"; + ResourceIdentifier containerAppsBuildResourceId = ContainerAppsBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, buildName); + ContainerAppsBuildResource containerAppsBuildResource = client.GetContainerAppsBuildResource(containerAppsBuildResourceId); + + // invoke the operation + await containerAppsBuildResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsBuildResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsBuildResourceCollection.cs new file mode 100644 index 000000000000..8e2761e2d07d --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsBuildResourceCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppsBuildResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ContainerAppsBuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsBuilds_Get.json + // this example is just showing the usage of "ContainerAppsBuilds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "testCapp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsBuildResource + ContainerAppsBuildResourceCollection collection = containerApp.GetContainerAppsBuildResources(); + + // invoke the operation + string buildName = "testBuild"; + ContainerAppsBuildResource result = await collection.GetAsync(buildName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsBuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ContainerAppsBuildsListByContainerApp0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsBuilds_ListByContainerApp.json + // this example is just showing the usage of "ContainerAppsBuildsByContainerApp_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "testCapp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsBuildResource + ContainerAppsBuildResourceCollection collection = containerApp.GetContainerAppsBuildResources(); + + // invoke the operation and iterate over the result + await foreach (ContainerAppsBuildResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsBuildResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ContainerAppsBuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsBuilds_Get.json + // this example is just showing the usage of "ContainerAppsBuilds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "testCapp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsBuildResource + ContainerAppsBuildResourceCollection collection = containerApp.GetContainerAppsBuildResources(); + + // invoke the operation + string buildName = "testBuild"; + bool result = await collection.ExistsAsync(buildName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ContainerAppsBuildsGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsBuilds_Get.json + // this example is just showing the usage of "ContainerAppsBuilds_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "testCapp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsBuildResource + ContainerAppsBuildResourceCollection collection = containerApp.GetContainerAppsBuildResources(); + + // invoke the operation + string buildName = "testBuild"; + NullableResponse response = await collection.GetIfExistsAsync(buildName); + ContainerAppsBuildResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsBuildResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsPatchResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsPatchResource.cs new file mode 100644 index 000000000000..3f524be349fe --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsPatchResource.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppsPatchResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ContainerAppsPatchesGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_Get.json + // this example is just showing the usage of "ContainerAppsPatches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppsPatchResource created on azure + // for more information of creating ContainerAppsPatchResource, please refer to the document of ContainerAppsPatchResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + string patchName = "testPatch-25fe4b"; + ResourceIdentifier containerAppsPatchResourceId = ContainerAppsPatchResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, patchName); + ContainerAppsPatchResource containerAppsPatchResource = client.GetContainerAppsPatchResource(containerAppsPatchResourceId); + + // invoke the operation + ContainerAppsPatchResource result = await containerAppsPatchResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsPatchResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ContainerAppsPatchesDelete0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_Delete.json + // this example is just showing the usage of "ContainerAppsPatches_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppsPatchResource created on azure + // for more information of creating ContainerAppsPatchResource, please refer to the document of ContainerAppsPatchResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + string patchName = "testPatch-25fe4b"; + ResourceIdentifier containerAppsPatchResourceId = ContainerAppsPatchResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, patchName); + ContainerAppsPatchResource containerAppsPatchResource = client.GetContainerAppsPatchResource(containerAppsPatchResourceId); + + // invoke the operation + await containerAppsPatchResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task SkipConfigure_ContainerAppsPatchesSkipConfigure0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_Skip_Configure.json + // this example is just showing the usage of "ContainerAppsPatches_SkipConfigure" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppsPatchResource created on azure + // for more information of creating ContainerAppsPatchResource, please refer to the document of ContainerAppsPatchResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + string patchName = "testPatch-25fe4b"; + ResourceIdentifier containerAppsPatchResourceId = ContainerAppsPatchResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, patchName); + ContainerAppsPatchResource containerAppsPatchResource = client.GetContainerAppsPatchResource(containerAppsPatchResourceId); + + // invoke the operation + PatchSkipConfig patchSkipConfig = new PatchSkipConfig + { + Skip = true, + }; + await containerAppsPatchResource.SkipConfigureAsync(WaitUntil.Completed, patchSkipConfig); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Apply_ContainerAppsPatchesApply0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_Apply.json + // this example is just showing the usage of "ContainerAppsPatches_Apply" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppsPatchResource created on azure + // for more information of creating ContainerAppsPatchResource, please refer to the document of ContainerAppsPatchResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + string patchName = "testPatch-25fe4b"; + ResourceIdentifier containerAppsPatchResourceId = ContainerAppsPatchResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, patchName); + ContainerAppsPatchResource containerAppsPatchResource = client.GetContainerAppsPatchResource(containerAppsPatchResourceId); + + // invoke the operation + ArmOperation lro = await containerAppsPatchResource.ApplyAsync(WaitUntil.Completed); + ContainerAppsPatchResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsPatchResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsPatchResourceCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsPatchResourceCollection.cs new file mode 100644 index 000000000000..baafc6ec77d5 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_ContainerAppsPatchResourceCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_ContainerAppsPatchResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ContainerAppsPatchesGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_Get.json + // this example is just showing the usage of "ContainerAppsPatches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsPatchResource + ContainerAppsPatchResourceCollection collection = containerApp.GetContainerAppsPatchResources(); + + // invoke the operation + string patchName = "testPatch-25fe4b"; + ContainerAppsPatchResource result = await collection.GetAsync(patchName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsPatchResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ContainerAppsPatchesListByContainerApp0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_ListByContainerApp.json + // this example is just showing the usage of "ContainerAppsPatches_ListByContainerApp" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsPatchResource + ContainerAppsPatchResourceCollection collection = containerApp.GetContainerAppsPatchResources(); + + // invoke the operation and iterate over the result + await foreach (ContainerAppsPatchResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsPatchResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ContainerAppsPatchesGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_Get.json + // this example is just showing the usage of "ContainerAppsPatches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsPatchResource + ContainerAppsPatchResourceCollection collection = containerApp.GetContainerAppsPatchResources(); + + // invoke the operation + string patchName = "testPatch-25fe4b"; + bool result = await collection.ExistsAsync(patchName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ContainerAppsPatchesGet0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerAppsPatches_Get.json + // this example is just showing the usage of "ContainerAppsPatches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg"; + string containerAppName = "test-app"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this ContainerAppsPatchResource + ContainerAppsPatchResourceCollection collection = containerApp.GetContainerAppsPatchResources(); + + // invoke the operation + string patchName = "testPatch-25fe4b"; + NullableResponse response = await collection.GetIfExistsAsync(patchName); + ContainerAppsPatchResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerAppsPatchResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprComponentResiliencyPolicyCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprComponentResiliencyPolicyCollection.cs new file mode 100644 index 000000000000..3b703ff8db66 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprComponentResiliencyPolicyCollection.cs @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_DaprComponentResiliencyPolicyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateDaprComponentResiliencyPolicyWithAllOptions() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentDaprComponentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentDaprComponentResource, please refer to the document of ContainerAppManagedEnvironmentDaprComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + ResourceIdentifier containerAppManagedEnvironmentDaprComponentResourceId = ContainerAppManagedEnvironmentDaprComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName); + ContainerAppManagedEnvironmentDaprComponentResource containerAppManagedEnvironmentDaprComponent = client.GetContainerAppManagedEnvironmentDaprComponentResource(containerAppManagedEnvironmentDaprComponentResourceId); + + // get the collection of this DaprComponentResiliencyPolicyResource + DaprComponentResiliencyPolicyCollection collection = containerAppManagedEnvironmentDaprComponent.GetDaprComponentResiliencyPolicies(); + + // invoke the operation + string name = "myresiliencypolicy"; + DaprComponentResiliencyPolicyData data = new DaprComponentResiliencyPolicyData + { + InboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 15, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 2000, + MaxIntervalInMilliseconds = 5500, + }, + }, + ResponseTimeoutInSeconds = 30, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 5, + TimeoutInSeconds = 10, + IntervalInSeconds = 4, + }, + }, + OutboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 5, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 100, + MaxIntervalInMilliseconds = 30000, + }, + }, + ResponseTimeoutInSeconds = 12, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 3, + TimeoutInSeconds = 20, + IntervalInSeconds = 60, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DaprComponentResiliencyPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentDaprComponentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentDaprComponentResource, please refer to the document of ContainerAppManagedEnvironmentDaprComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + ResourceIdentifier containerAppManagedEnvironmentDaprComponentResourceId = ContainerAppManagedEnvironmentDaprComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName); + ContainerAppManagedEnvironmentDaprComponentResource containerAppManagedEnvironmentDaprComponent = client.GetContainerAppManagedEnvironmentDaprComponentResource(containerAppManagedEnvironmentDaprComponentResourceId); + + // get the collection of this DaprComponentResiliencyPolicyResource + DaprComponentResiliencyPolicyCollection collection = containerAppManagedEnvironmentDaprComponent.GetDaprComponentResiliencyPolicies(); + + // invoke the operation + string name = "myresiliencypolicy"; + DaprComponentResiliencyPolicyData data = new DaprComponentResiliencyPolicyData + { + OutboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 5, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 100, + MaxIntervalInMilliseconds = 30000, + }, + }, + ResponseTimeoutInSeconds = 12, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 3, + TimeoutInSeconds = 20, + IntervalInSeconds = 60, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DaprComponentResiliencyPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateDaprComponentResiliencyPolicyWithSparseOptions() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentDaprComponentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentDaprComponentResource, please refer to the document of ContainerAppManagedEnvironmentDaprComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + ResourceIdentifier containerAppManagedEnvironmentDaprComponentResourceId = ContainerAppManagedEnvironmentDaprComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName); + ContainerAppManagedEnvironmentDaprComponentResource containerAppManagedEnvironmentDaprComponent = client.GetContainerAppManagedEnvironmentDaprComponentResource(containerAppManagedEnvironmentDaprComponentResourceId); + + // get the collection of this DaprComponentResiliencyPolicyResource + DaprComponentResiliencyPolicyCollection collection = containerAppManagedEnvironmentDaprComponent.GetDaprComponentResiliencyPolicies(); + + // invoke the operation + string name = "myresiliencypolicy"; + DaprComponentResiliencyPolicyData data = new DaprComponentResiliencyPolicyData + { + InboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 5, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 2000, + MaxIntervalInMilliseconds = 5500, + }, + }, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 3, + TimeoutInSeconds = 20, + }, + }, + OutboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + ResponseTimeoutInSeconds = 12, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DaprComponentResiliencyPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprComponentResiliencyPolicy() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicies_Get.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentDaprComponentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentDaprComponentResource, please refer to the document of ContainerAppManagedEnvironmentDaprComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + ResourceIdentifier containerAppManagedEnvironmentDaprComponentResourceId = ContainerAppManagedEnvironmentDaprComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName); + ContainerAppManagedEnvironmentDaprComponentResource containerAppManagedEnvironmentDaprComponent = client.GetContainerAppManagedEnvironmentDaprComponentResource(containerAppManagedEnvironmentDaprComponentResourceId); + + // get the collection of this DaprComponentResiliencyPolicyResource + DaprComponentResiliencyPolicyCollection collection = containerAppManagedEnvironmentDaprComponent.GetDaprComponentResiliencyPolicies(); + + // invoke the operation + string name = "myresiliencypolicy"; + DaprComponentResiliencyPolicyResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDaprComponentResiliencyPolicies() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicies_List.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentDaprComponentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentDaprComponentResource, please refer to the document of ContainerAppManagedEnvironmentDaprComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + ResourceIdentifier containerAppManagedEnvironmentDaprComponentResourceId = ContainerAppManagedEnvironmentDaprComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName); + ContainerAppManagedEnvironmentDaprComponentResource containerAppManagedEnvironmentDaprComponent = client.GetContainerAppManagedEnvironmentDaprComponentResource(containerAppManagedEnvironmentDaprComponentResourceId); + + // get the collection of this DaprComponentResiliencyPolicyResource + DaprComponentResiliencyPolicyCollection collection = containerAppManagedEnvironmentDaprComponent.GetDaprComponentResiliencyPolicies(); + + // invoke the operation and iterate over the result + await foreach (DaprComponentResiliencyPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetDaprComponentResiliencyPolicy() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicies_Get.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentDaprComponentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentDaprComponentResource, please refer to the document of ContainerAppManagedEnvironmentDaprComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + ResourceIdentifier containerAppManagedEnvironmentDaprComponentResourceId = ContainerAppManagedEnvironmentDaprComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName); + ContainerAppManagedEnvironmentDaprComponentResource containerAppManagedEnvironmentDaprComponent = client.GetContainerAppManagedEnvironmentDaprComponentResource(containerAppManagedEnvironmentDaprComponentResourceId); + + // get the collection of this DaprComponentResiliencyPolicyResource + DaprComponentResiliencyPolicyCollection collection = containerAppManagedEnvironmentDaprComponent.GetDaprComponentResiliencyPolicies(); + + // invoke the operation + string name = "myresiliencypolicy"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetDaprComponentResiliencyPolicy() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicies_Get.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentDaprComponentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentDaprComponentResource, please refer to the document of ContainerAppManagedEnvironmentDaprComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + ResourceIdentifier containerAppManagedEnvironmentDaprComponentResourceId = ContainerAppManagedEnvironmentDaprComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName); + ContainerAppManagedEnvironmentDaprComponentResource containerAppManagedEnvironmentDaprComponent = client.GetContainerAppManagedEnvironmentDaprComponentResource(containerAppManagedEnvironmentDaprComponentResourceId); + + // get the collection of this DaprComponentResiliencyPolicyResource + DaprComponentResiliencyPolicyCollection collection = containerAppManagedEnvironmentDaprComponent.GetDaprComponentResiliencyPolicies(); + + // invoke the operation + string name = "myresiliencypolicy"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DaprComponentResiliencyPolicyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprComponentResiliencyPolicyResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprComponentResiliencyPolicyResource.cs new file mode 100644 index 000000000000..8199f7da0b70 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprComponentResiliencyPolicyResource.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_DaprComponentResiliencyPolicyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprComponentResiliencyPolicy() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicies_Get.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprComponentResiliencyPolicyResource created on azure + // for more information of creating DaprComponentResiliencyPolicyResource, please refer to the document of DaprComponentResiliencyPolicyResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + string name = "myresiliencypolicy"; + ResourceIdentifier daprComponentResiliencyPolicyResourceId = DaprComponentResiliencyPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName, name); + DaprComponentResiliencyPolicyResource daprComponentResiliencyPolicy = client.GetDaprComponentResiliencyPolicyResource(daprComponentResiliencyPolicyResourceId); + + // invoke the operation + DaprComponentResiliencyPolicyResource result = await daprComponentResiliencyPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDaprComponentResiliencyPolicy() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicies_Delete.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprComponentResiliencyPolicyResource created on azure + // for more information of creating DaprComponentResiliencyPolicyResource, please refer to the document of DaprComponentResiliencyPolicyResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + string name = "myresiliencypolicy"; + ResourceIdentifier daprComponentResiliencyPolicyResourceId = DaprComponentResiliencyPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName, name); + DaprComponentResiliencyPolicyResource daprComponentResiliencyPolicy = client.GetDaprComponentResiliencyPolicyResource(daprComponentResiliencyPolicyResourceId); + + // invoke the operation + await daprComponentResiliencyPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateDaprComponentResiliencyPolicyWithAllOptions() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprComponentResiliencyPolicyResource created on azure + // for more information of creating DaprComponentResiliencyPolicyResource, please refer to the document of DaprComponentResiliencyPolicyResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + string name = "myresiliencypolicy"; + ResourceIdentifier daprComponentResiliencyPolicyResourceId = DaprComponentResiliencyPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName, name); + DaprComponentResiliencyPolicyResource daprComponentResiliencyPolicy = client.GetDaprComponentResiliencyPolicyResource(daprComponentResiliencyPolicyResourceId); + + // invoke the operation + DaprComponentResiliencyPolicyData data = new DaprComponentResiliencyPolicyData + { + InboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 15, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 2000, + MaxIntervalInMilliseconds = 5500, + }, + }, + ResponseTimeoutInSeconds = 30, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 5, + TimeoutInSeconds = 10, + IntervalInSeconds = 4, + }, + }, + OutboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 5, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 100, + MaxIntervalInMilliseconds = 30000, + }, + }, + ResponseTimeoutInSeconds = 12, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 3, + TimeoutInSeconds = 20, + IntervalInSeconds = 60, + }, + }, + }; + ArmOperation lro = await daprComponentResiliencyPolicy.UpdateAsync(WaitUntil.Completed, data); + DaprComponentResiliencyPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprComponentResiliencyPolicyResource created on azure + // for more information of creating DaprComponentResiliencyPolicyResource, please refer to the document of DaprComponentResiliencyPolicyResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + string name = "myresiliencypolicy"; + ResourceIdentifier daprComponentResiliencyPolicyResourceId = DaprComponentResiliencyPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName, name); + DaprComponentResiliencyPolicyResource daprComponentResiliencyPolicy = client.GetDaprComponentResiliencyPolicyResource(daprComponentResiliencyPolicyResourceId); + + // invoke the operation + DaprComponentResiliencyPolicyData data = new DaprComponentResiliencyPolicyData + { + OutboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 5, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 100, + MaxIntervalInMilliseconds = 30000, + }, + }, + ResponseTimeoutInSeconds = 12, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 3, + TimeoutInSeconds = 20, + IntervalInSeconds = 60, + }, + }, + }; + ArmOperation lro = await daprComponentResiliencyPolicy.UpdateAsync(WaitUntil.Completed, data); + DaprComponentResiliencyPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateDaprComponentResiliencyPolicyWithSparseOptions() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json + // this example is just showing the usage of "DaprComponentResiliencyPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprComponentResiliencyPolicyResource created on azure + // for more information of creating DaprComponentResiliencyPolicyResource, please refer to the document of DaprComponentResiliencyPolicyResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string componentName = "mydaprcomponent"; + string name = "myresiliencypolicy"; + ResourceIdentifier daprComponentResiliencyPolicyResourceId = DaprComponentResiliencyPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, componentName, name); + DaprComponentResiliencyPolicyResource daprComponentResiliencyPolicy = client.GetDaprComponentResiliencyPolicyResource(daprComponentResiliencyPolicyResourceId); + + // invoke the operation + DaprComponentResiliencyPolicyData data = new DaprComponentResiliencyPolicyData + { + InboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + HttpRetryPolicy = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + { + MaxRetries = 5, + RetryBackOff = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + { + InitialDelayInMilliseconds = 2000, + MaxIntervalInMilliseconds = 5500, + }, + }, + CircuitBreakerPolicy = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + { + ConsecutiveErrors = 3, + TimeoutInSeconds = 20, + }, + }, + OutboundPolicy = new DaprComponentResiliencyPolicyConfiguration + { + ResponseTimeoutInSeconds = 12, + }, + }; + ArmOperation lro = await daprComponentResiliencyPolicy.UpdateAsync(WaitUntil.Completed, data); + DaprComponentResiliencyPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprComponentResiliencyPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprSubscriptionCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprSubscriptionCollection.cs new file mode 100644 index 000000000000..4d17b0d2496b --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprSubscriptionCollection.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_DaprSubscriptionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json + // this example is just showing the usage of "DaprSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mysubscription"; + DaprSubscriptionData data = new DaprSubscriptionData + { + PubsubName = "mypubsubcomponent", + Topic = "inventory", + Routes = new DaprSubscriptionRoutes + { + Default = "/products", + }, + Scopes = { "warehouseapp", "customersupportapp" }, + BulkSubscribe = new DaprSubscriptionBulkSubscribeConfig + { + IsEnabled = true, + MaxMessagesCount = 123, + MaxAwaitDurationMs = 500, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DaprSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateDaprSubscriptionWithDefaultRouteOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_CreateOrUpdate_DefaultRoute.json + // this example is just showing the usage of "DaprSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mysubscription"; + DaprSubscriptionData data = new DaprSubscriptionData + { + PubsubName = "mypubsubcomponent", + Topic = "inventory", + Routes = new DaprSubscriptionRoutes + { + Default = "/products", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DaprSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateDaprSubscriptionWithRouteRulesAndMetadata() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json + // this example is just showing the usage of "DaprSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mysubscription"; + DaprSubscriptionData data = new DaprSubscriptionData + { + PubsubName = "mypubsubcomponent", + Topic = "inventory", + Routes = new DaprSubscriptionRoutes + { + Rules = {new DaprSubscriptionRouteRule +{ +Match = "event.type == 'widget'", +Path = "/widgets", +}, new DaprSubscriptionRouteRule +{ +Match = "event.type == 'gadget'", +Path = "/gadgets", +}}, + Default = "/products", + }, + Metadata = +{ +["foo"] = "bar", +["hello"] = "world" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DaprSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprSubscriptionWithBulkSubscribeConfigurationAndScopes() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + DaprSubscriptionResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprSubscriptionWithDefaultRouteOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + DaprSubscriptionResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprSubscriptionWithRouteRulesAndMetadata() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + DaprSubscriptionResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDaprSubscriptions() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_List.json + // this example is just showing the usage of "DaprSubscriptions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation and iterate over the result + await foreach (DaprSubscriptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetDaprSubscriptionWithBulkSubscribeConfigurationAndScopes() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetDaprSubscriptionWithDefaultRouteOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetDaprSubscriptionWithRouteRulesAndMetadata() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetDaprSubscriptionWithBulkSubscribeConfigurationAndScopes() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DaprSubscriptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetDaprSubscriptionWithDefaultRouteOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DaprSubscriptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetDaprSubscriptionWithRouteRulesAndMetadata() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DaprSubscriptionResource + DaprSubscriptionCollection collection = containerAppManagedEnvironment.GetDaprSubscriptions(); + + // invoke the operation + string name = "mypubsubcomponent"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DaprSubscriptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprSubscriptionResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprSubscriptionResource.cs new file mode 100644 index 000000000000..38bf2c7c3802 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DaprSubscriptionResource.cs @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_DaprSubscriptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprSubscriptionWithBulkSubscribeConfigurationAndScopes() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprSubscriptionResource created on azure + // for more information of creating DaprSubscriptionResource, please refer to the document of DaprSubscriptionResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mypubsubcomponent"; + ResourceIdentifier daprSubscriptionResourceId = DaprSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DaprSubscriptionResource daprSubscription = client.GetDaprSubscriptionResource(daprSubscriptionResourceId); + + // invoke the operation + DaprSubscriptionResource result = await daprSubscription.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprSubscriptionWithDefaultRouteOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprSubscriptionResource created on azure + // for more information of creating DaprSubscriptionResource, please refer to the document of DaprSubscriptionResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mypubsubcomponent"; + ResourceIdentifier daprSubscriptionResourceId = DaprSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DaprSubscriptionResource daprSubscription = client.GetDaprSubscriptionResource(daprSubscriptionResourceId); + + // invoke the operation + DaprSubscriptionResource result = await daprSubscription.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetDaprSubscriptionWithRouteRulesAndMetadata() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json + // this example is just showing the usage of "DaprSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprSubscriptionResource created on azure + // for more information of creating DaprSubscriptionResource, please refer to the document of DaprSubscriptionResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mypubsubcomponent"; + ResourceIdentifier daprSubscriptionResourceId = DaprSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DaprSubscriptionResource daprSubscription = client.GetDaprSubscriptionResource(daprSubscriptionResourceId); + + // invoke the operation + DaprSubscriptionResource result = await daprSubscription.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDaprSubscription() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_Delete.json + // this example is just showing the usage of "DaprSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprSubscriptionResource created on azure + // for more information of creating DaprSubscriptionResource, please refer to the document of DaprSubscriptionResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mysubscription"; + ResourceIdentifier daprSubscriptionResourceId = DaprSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DaprSubscriptionResource daprSubscription = client.GetDaprSubscriptionResource(daprSubscriptionResourceId); + + // invoke the operation + await daprSubscription.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json + // this example is just showing the usage of "DaprSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprSubscriptionResource created on azure + // for more information of creating DaprSubscriptionResource, please refer to the document of DaprSubscriptionResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mysubscription"; + ResourceIdentifier daprSubscriptionResourceId = DaprSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DaprSubscriptionResource daprSubscription = client.GetDaprSubscriptionResource(daprSubscriptionResourceId); + + // invoke the operation + DaprSubscriptionData data = new DaprSubscriptionData + { + PubsubName = "mypubsubcomponent", + Topic = "inventory", + Routes = new DaprSubscriptionRoutes + { + Default = "/products", + }, + Scopes = { "warehouseapp", "customersupportapp" }, + BulkSubscribe = new DaprSubscriptionBulkSubscribeConfig + { + IsEnabled = true, + MaxMessagesCount = 123, + MaxAwaitDurationMs = 500, + }, + }; + ArmOperation lro = await daprSubscription.UpdateAsync(WaitUntil.Completed, data); + DaprSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateDaprSubscriptionWithDefaultRouteOnly() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_CreateOrUpdate_DefaultRoute.json + // this example is just showing the usage of "DaprSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprSubscriptionResource created on azure + // for more information of creating DaprSubscriptionResource, please refer to the document of DaprSubscriptionResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mysubscription"; + ResourceIdentifier daprSubscriptionResourceId = DaprSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DaprSubscriptionResource daprSubscription = client.GetDaprSubscriptionResource(daprSubscriptionResourceId); + + // invoke the operation + DaprSubscriptionData data = new DaprSubscriptionData + { + PubsubName = "mypubsubcomponent", + Topic = "inventory", + Routes = new DaprSubscriptionRoutes + { + Default = "/products", + }, + }; + ArmOperation lro = await daprSubscription.UpdateAsync(WaitUntil.Completed, data); + DaprSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateDaprSubscriptionWithRouteRulesAndMetadata() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json + // this example is just showing the usage of "DaprSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DaprSubscriptionResource created on azure + // for more information of creating DaprSubscriptionResource, please refer to the document of DaprSubscriptionResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mysubscription"; + ResourceIdentifier daprSubscriptionResourceId = DaprSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DaprSubscriptionResource daprSubscription = client.GetDaprSubscriptionResource(daprSubscriptionResourceId); + + // invoke the operation + DaprSubscriptionData data = new DaprSubscriptionData + { + PubsubName = "mypubsubcomponent", + Topic = "inventory", + Routes = new DaprSubscriptionRoutes + { + Rules = {new DaprSubscriptionRouteRule +{ +Match = "event.type == 'widget'", +Path = "/widgets", +}, new DaprSubscriptionRouteRule +{ +Match = "event.type == 'gadget'", +Path = "/gadgets", +}}, + Default = "/products", + }, + Metadata = +{ +["foo"] = "bar", +["hello"] = "world" +}, + }; + ArmOperation lro = await daprSubscription.UpdateAsync(WaitUntil.Completed, data); + DaprSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DaprSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DotNetComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DotNetComponentCollection.cs new file mode 100644 index 000000000000..4a39fe78ad18 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DotNetComponentCollection.cs @@ -0,0 +1,396 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_DotNetComponentCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateNETComponent() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_CreateOrUpdate.json + // this example is just showing the usage of "DotNetComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + DotNetComponentData data = new DotNetComponentData + { + ComponentType = DotNetComponentType.AspireDashboard, + Configurations = {new DotNetComponentConfigurationProperty +{ +PropertyName = "dashboard-theme", +Value = "dark", +}}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DotNetComponentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateNETComponentWithServiceBinds() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_CreateOrUpdate_ServiceBind.json + // this example is just showing the usage of "DotNetComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + DotNetComponentData data = new DotNetComponentData + { + ComponentType = DotNetComponentType.AspireDashboard, + Configurations = {new DotNetComponentConfigurationProperty +{ +PropertyName = "dashboard-theme", +Value = "dark", +}}, + ServiceBinds = {new DotNetComponentServiceBind +{ +Name = "yellowcat", +ServiceId = new ResourceIdentifier("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"), +}}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DotNetComponentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetNETComponent() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + DotNetComponentResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetNETComponentWithServiceBinds() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get_ServiceBind.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + DotNetComponentResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListNETComponents() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_List.json + // this example is just showing the usage of "DotNetComponents_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation and iterate over the result + await foreach (DotNetComponentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListNETComponentsWithServiceBinds() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_List_ServiceBind.json + // this example is just showing the usage of "DotNetComponents_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation and iterate over the result + await foreach (DotNetComponentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetNETComponent() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetNETComponentWithServiceBinds() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get_ServiceBind.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetNETComponent() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DotNetComponentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetNETComponentWithServiceBinds() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get_ServiceBind.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppManagedEnvironmentResource created on azure + // for more information of creating ContainerAppManagedEnvironmentResource, please refer to the document of ContainerAppManagedEnvironmentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + ResourceIdentifier containerAppManagedEnvironmentResourceId = ContainerAppManagedEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName); + ContainerAppManagedEnvironmentResource containerAppManagedEnvironment = client.GetContainerAppManagedEnvironmentResource(containerAppManagedEnvironmentResourceId); + + // get the collection of this DotNetComponentResource + DotNetComponentCollection collection = containerAppManagedEnvironment.GetDotNetComponents(); + + // invoke the operation + string name = "mydotnetcomponent"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DotNetComponentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DotNetComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DotNetComponentResource.cs new file mode 100644 index 000000000000..ae0ff8db73ad --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_DotNetComponentResource.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_DotNetComponentResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetNETComponent() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DotNetComponentResource created on azure + // for more information of creating DotNetComponentResource, please refer to the document of DotNetComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mydotnetcomponent"; + ResourceIdentifier dotNetComponentResourceId = DotNetComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DotNetComponentResource dotNetComponent = client.GetDotNetComponentResource(dotNetComponentResourceId); + + // invoke the operation + DotNetComponentResource result = await dotNetComponent.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetNETComponentWithServiceBinds() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Get_ServiceBind.json + // this example is just showing the usage of "DotNetComponents_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DotNetComponentResource created on azure + // for more information of creating DotNetComponentResource, please refer to the document of DotNetComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mydotnetcomponent"; + ResourceIdentifier dotNetComponentResourceId = DotNetComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DotNetComponentResource dotNetComponent = client.GetDotNetComponentResource(dotNetComponentResourceId); + + // invoke the operation + DotNetComponentResource result = await dotNetComponent.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteNETComponent() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Delete.json + // this example is just showing the usage of "DotNetComponents_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DotNetComponentResource created on azure + // for more information of creating DotNetComponentResource, please refer to the document of DotNetComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mydotnetcomponent"; + ResourceIdentifier dotNetComponentResourceId = DotNetComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DotNetComponentResource dotNetComponent = client.GetDotNetComponentResource(dotNetComponentResourceId); + + // invoke the operation + await dotNetComponent.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_PatchNETComponent() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Patch.json + // this example is just showing the usage of "DotNetComponents_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DotNetComponentResource created on azure + // for more information of creating DotNetComponentResource, please refer to the document of DotNetComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mydotnetcomponent"; + ResourceIdentifier dotNetComponentResourceId = DotNetComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DotNetComponentResource dotNetComponent = client.GetDotNetComponentResource(dotNetComponentResourceId); + + // invoke the operation + DotNetComponentData data = new DotNetComponentData + { + ComponentType = DotNetComponentType.AspireDashboard, + Configurations = {new DotNetComponentConfigurationProperty +{ +PropertyName = "dashboard-theme", +Value = "dark", +}}, + }; + ArmOperation lro = await dotNetComponent.UpdateAsync(WaitUntil.Completed, data); + DotNetComponentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_PatchNETComponentWithServiceBinds() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/DotNetComponents_Patch_ServiceBind.json + // this example is just showing the usage of "DotNetComponents_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DotNetComponentResource created on azure + // for more information of creating DotNetComponentResource, please refer to the document of DotNetComponentResource + string subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; + string resourceGroupName = "examplerg"; + string environmentName = "myenvironment"; + string name = "mydotnetcomponent"; + ResourceIdentifier dotNetComponentResourceId = DotNetComponentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, environmentName, name); + DotNetComponentResource dotNetComponent = client.GetDotNetComponentResource(dotNetComponentResourceId); + + // invoke the operation + DotNetComponentData data = new DotNetComponentData + { + ComponentType = DotNetComponentType.AspireDashboard, + Configurations = {new DotNetComponentConfigurationProperty +{ +PropertyName = "dashboard-theme", +Value = "dark", +}}, + ServiceBinds = {new DotNetComponentServiceBind +{ +Name = "yellowcat", +ServiceId = new ResourceIdentifier("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"), +}}, + }; + ArmOperation lro = await dotNetComponent.UpdateAsync(WaitUntil.Completed, data); + DotNetComponentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DotNetComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentCollection.cs index 08216f797ec9..b35b8a438c6a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_JavaComponentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateJavaComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_CreateOrUpdate.json // this example is just showing the usage of "JavaComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task CreateOrUpdate_CreateOrUpdateJavaComponent() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateJavaComponentWithServiceBinds() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_CreateOrUpdate_ServiceBind.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_CreateOrUpdate_ServiceBind.json // this example is just showing the usage of "JavaComponents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task CreateOrUpdate_CreateOrUpdateJavaComponentWithServiceBinds() [Ignore("Only validating compilation of examples")] public async Task Get_GetJavaComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task Get_GetJavaComponent() [Ignore("Only validating compilation of examples")] public async Task Get_GetJavaComponentWithServiceBinds() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get_ServiceBind.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get_ServiceBind.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task Get_GetJavaComponentWithServiceBinds() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJavaComponents() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_List.json // this example is just showing the usage of "JavaComponents_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -239,7 +239,7 @@ public async Task GetAll_ListJavaComponents() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJavaComponentsWithServiceBinds() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_List_ServiceBind.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_List_ServiceBind.json // this example is just showing the usage of "JavaComponents_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task GetAll_ListJavaComponentsWithServiceBinds() [Ignore("Only validating compilation of examples")] public async Task Exists_GetJavaComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -305,7 +305,7 @@ public async Task Exists_GetJavaComponent() [Ignore("Only validating compilation of examples")] public async Task Exists_GetJavaComponentWithServiceBinds() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get_ServiceBind.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get_ServiceBind.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -335,7 +335,7 @@ public async Task Exists_GetJavaComponentWithServiceBinds() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetJavaComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -377,7 +377,7 @@ public async Task GetIfExists_GetJavaComponent() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetJavaComponentWithServiceBinds() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get_ServiceBind.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get_ServiceBind.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentResource.cs index b40cb5aa3e0f..2ef74ff3e93e 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_JavaComponentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_JavaComponentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetJavaComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetJavaComponent() [Ignore("Only validating compilation of examples")] public async Task Get_GetJavaComponentWithServiceBinds() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Get_ServiceBind.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Get_ServiceBind.json // this example is just showing the usage of "JavaComponents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_GetJavaComponentWithServiceBinds() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteJavaComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Delete.json // this example is just showing the usage of "JavaComponents_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_DeleteJavaComponent() [Ignore("Only validating compilation of examples")] public async Task Update_PatchJavaComponent() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Patch.json // this example is just showing the usage of "JavaComponents_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Update_PatchJavaComponent() [Ignore("Only validating compilation of examples")] public async Task Update_PatchJavaComponentWithServiceBinds() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/JavaComponents_Patch_ServiceBind.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/JavaComponents_Patch_ServiceBind.json // this example is just showing the usage of "JavaComponents_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LabelHistoryCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LabelHistoryCollection.cs new file mode 100644 index 000000000000..0a474ee7c6f8 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LabelHistoryCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_LabelHistoryCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetContainerAppSSingleLabelHistory() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LabelHistory_Get.json + // this example is just showing the usage of "ContainerAppsLabelHistory_GetLabelHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testContainerApp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this LabelHistoryResource + LabelHistoryCollection collection = containerApp.GetLabelHistories(); + + // invoke the operation + string labelName = "dev"; + LabelHistoryResource result = await collection.GetAsync(labelName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + LabelHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListContainerAppSAllLabelHistory() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LabelHistory_List.json + // this example is just showing the usage of "ContainerAppsLabelHistory_ListLabelHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testContainerApp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this LabelHistoryResource + LabelHistoryCollection collection = containerApp.GetLabelHistories(); + + // invoke the operation and iterate over the result + await foreach (LabelHistoryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + LabelHistoryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetContainerAppSSingleLabelHistory() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LabelHistory_Get.json + // this example is just showing the usage of "ContainerAppsLabelHistory_GetLabelHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testContainerApp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this LabelHistoryResource + LabelHistoryCollection collection = containerApp.GetLabelHistories(); + + // invoke the operation + string labelName = "dev"; + bool result = await collection.ExistsAsync(labelName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetContainerAppSSingleLabelHistory() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LabelHistory_Get.json + // this example is just showing the usage of "ContainerAppsLabelHistory_GetLabelHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerAppResource created on azure + // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testContainerApp"; + ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName); + ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId); + + // get the collection of this LabelHistoryResource + LabelHistoryCollection collection = containerApp.GetLabelHistories(); + + // invoke the operation + string labelName = "dev"; + NullableResponse response = await collection.GetIfExistsAsync(labelName); + LabelHistoryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + LabelHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LabelHistoryResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LabelHistoryResource.cs new file mode 100644 index 000000000000..ebd7e296bad0 --- /dev/null +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LabelHistoryResource.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.AppContainers.Samples +{ + public partial class Sample_LabelHistoryResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetContainerAppSSingleLabelHistory() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LabelHistory_Get.json + // this example is just showing the usage of "ContainerAppsLabelHistory_GetLabelHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this LabelHistoryResource created on azure + // for more information of creating LabelHistoryResource, please refer to the document of LabelHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testContainerApp"; + string labelName = "dev"; + ResourceIdentifier labelHistoryResourceId = LabelHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, labelName); + LabelHistoryResource labelHistory = client.GetLabelHistoryResource(labelHistoryResourceId); + + // invoke the operation + LabelHistoryResource result = await labelHistory.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + LabelHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteContainerAppSLabelHistoryForAGivenLabel() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LabelHistory_Delete.json + // this example is just showing the usage of "ContainerAppsLabelHistory_DeleteLabelHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this LabelHistoryResource created on azure + // for more information of creating LabelHistoryResource, please refer to the document of LabelHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string containerAppName = "testContainerApp"; + string labelName = "dev"; + ResourceIdentifier labelHistoryResourceId = LabelHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, labelName); + LabelHistoryResource labelHistory = client.GetLabelHistoryResource(labelHistoryResourceId); + + // invoke the operation + await labelHistory.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppCollection.cs index c2deff91447b..7494870667ae 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_LogicAppCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateLogicAppExtension() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_Create.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_Create.json // this example is just showing the usage of "LogicApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -40,7 +40,10 @@ public async Task CreateOrUpdate_CreateLogicAppExtension() // invoke the operation string logicAppName = "testcontainerApp0"; - LogicAppData data = new LogicAppData(); + LogicAppData data = new LogicAppData + { + Properties = BinaryData.FromObjectAsJson(new object()), + }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, logicAppName, data); LogicAppResource result = lro.Value; @@ -55,7 +58,7 @@ public async Task CreateOrUpdate_CreateLogicAppExtension() [Ignore("Only validating compilation of examples")] public async Task Get_GetLogicAppExtensionByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_Get.json // this example is just showing the usage of "LogicApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +92,7 @@ public async Task Get_GetLogicAppExtensionByName() [Ignore("Only validating compilation of examples")] public async Task Exists_GetLogicAppExtensionByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_Get.json // this example is just showing the usage of "LogicApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +122,7 @@ public async Task Exists_GetLogicAppExtensionByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetLogicAppExtensionByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_Get.json // this example is just showing the usage of "LogicApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppResource.cs index 40750ed1f17b..e3aae54b2228 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppResource.cs @@ -6,9 +6,11 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.AppContainers.Models; using NUnit.Framework; namespace Azure.ResourceManager.AppContainers.Samples @@ -19,7 +21,7 @@ public partial class Sample_LogicAppResource [Ignore("Only validating compilation of examples")] public async Task Get_GetLogicAppExtensionByName() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_Get.json // this example is just showing the usage of "LogicApps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +52,7 @@ public async Task Get_GetLogicAppExtensionByName() [Ignore("Only validating compilation of examples")] public async Task Delete_CreateLogicAppExtension() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_Delete.json // this example is just showing the usage of "LogicApps_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +79,7 @@ public async Task Delete_CreateLogicAppExtension() [Ignore("Only validating compilation of examples")] public async Task Update_CreateLogicAppExtension() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_Create.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_Create.json // this example is just showing the usage of "LogicApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +97,10 @@ public async Task Update_CreateLogicAppExtension() LogicAppResource logicApp = client.GetLogicAppResource(logicAppResourceId); // invoke the operation - LogicAppData data = new LogicAppData(); + LogicAppData data = new LogicAppData + { + Properties = BinaryData.FromObjectAsJson(new object()), + }; ArmOperation lro = await logicApp.UpdateAsync(WaitUntil.Completed, data); LogicAppResource result = lro.Value; @@ -106,11 +111,130 @@ public async Task Update_CreateLogicAppExtension() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DeployWorkflowArtifacts_DeleteWorkflowArtifacts() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_DeleteDeployWorkflowArtifacts.json + // this example is just showing the usage of "LogicApps_DeployWorkflowArtifacts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this LogicAppResource created on azure + // for more information of creating LogicAppResource, please refer to the document of LogicAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string containerAppName = "testapp2"; + string logicAppName = "testapp2"; + ResourceIdentifier logicAppResourceId = LogicAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, logicAppName); + LogicAppResource logicApp = client.GetLogicAppResource(logicAppResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts + { + FilesToDelete = { "test/workflow.json", "test/" }, + }; + await logicApp.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DeployWorkflowArtifacts_DeploysWorkflowArtifacts() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_PostDeployWorkflowArtifacts.json + // this example is just showing the usage of "LogicApps_DeployWorkflowArtifacts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this LogicAppResource created on azure + // for more information of creating LogicAppResource, please refer to the document of LogicAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string containerAppName = "testapp2"; + string logicAppName = "testapp2"; + ResourceIdentifier logicAppResourceId = LogicAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, logicAppName); + LogicAppResource logicApp = client.GetLogicAppResource(logicAppResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts + { + AppSettings = BinaryData.FromObjectAsJson(new + { + eventHub_connectionString = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=", + }), + Files = BinaryData.FromObjectAsJson(new Dictionary + { + ["connections.json"] = new + { + managedApiConnections = new object(), + serviceProviderConnections = new + { + eventHub = new + { + displayName = "example1", + parameterValues = new + { + connectionString = "@appsetting('eventHub_connectionString')", + }, + serviceProvider = new + { + id = "/serviceProviders/eventHub", + }, + }, + }, + }, + ["test1/workflow.json"] = new + { + definition = new Dictionary + { + ["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + ["actions"] = new object(), + ["contentVersion"] = "1.0.0.0", + ["outputs"] = new object(), + ["triggers"] = new + { + When_events_are_available_in_Event_hub = new + { + type = "ServiceProvider", + inputs = new + { + parameters = new + { + eventHubName = "test123", + }, + serviceProviderConfiguration = new + { + operationId = "receiveEvents", + connectionName = "eventHub", + serviceProviderId = "/serviceProviders/eventHub", + }, + }, + splitOn = "@triggerOutputs()?['body']", + }, + } + }, + kind = "Stateful", + } + }), + }; + await logicApp.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetWorkflowsConnections_ListTheWorkflowsConfigurationConnections() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_ListConnections.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_ListConnections.json // this example is just showing the usage of "LogicApps_ListWorkflowsConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,5 +260,34 @@ public async Task GetWorkflowsConnections_ListTheWorkflowsConfigurationConnectio // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Invoke_GetWorkflowListCallBackURL() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_ListCallbackURL.json + // this example is just showing the usage of "LogicApps_Invoke" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this LogicAppResource created on azure + // for more information of creating LogicAppResource, please refer to the document of LogicAppResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string containerAppName = "testapp2"; + string logicAppName = "testapp2"; + ResourceIdentifier logicAppResourceId = LogicAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, logicAppName); + LogicAppResource logicApp = client.GetLogicAppResource(logicAppResourceId); + + // invoke the operation + string xMsLogicAppsProxyPath = "/runtime/webhooks/workflow/api/management/workflows/Stateful1/triggers/When_a_HTTP_request_is_received/listCallbackUrl"; + LogicAppsProxyMethod xMsLogicAppsProxyMethod = LogicAppsProxyMethod.Post; + BinaryData result = await logicApp.InvokeAsync(xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeCollection.cs index 7623f6712409..88b069e4174a 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_LogicAppWorkflowEnvelopeCollection [Ignore("Only validating compilation of examples")] public async Task Get_GETAWorkflow() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_GetWorkflow.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_GetWorkflow.json // this example is just showing the usage of "LogicApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GETAWorkflow() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheWorkflows() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_ListWorkflows.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_ListWorkflows.json // this example is just showing the usage of "LogicApps_ListWorkflows" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task GetAll_ListTheWorkflows() [Ignore("Only validating compilation of examples")] public async Task Exists_GETAWorkflow() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_GetWorkflow.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_GetWorkflow.json // this example is just showing the usage of "LogicApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GETAWorkflow() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GETAWorkflow() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_GetWorkflow.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_GetWorkflow.json // this example is just showing the usage of "LogicApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeResource.cs index e3ba931a9cc2..fa475473d7bd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_LogicAppWorkflowEnvelopeResource.cs @@ -19,7 +19,7 @@ public partial class Sample_LogicAppWorkflowEnvelopeResource [Ignore("Only validating compilation of examples")] public async Task Get_GETAWorkflow() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/LogicApps_GetWorkflow.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/LogicApps_GetWorkflow.json // this example is just showing the usage of "LogicApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolCollection.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolCollection.cs index 2ff2deeaf75e..a2fd233d8722 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolCollection.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolCollection.cs @@ -18,11 +18,65 @@ namespace Azure.ResourceManager.AppContainers.Samples { public partial class Sample_SessionPoolCollection { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateSessionPoolWithMCPServer() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_McpServer_CreateOrUpdate.json + // this example is just showing the usage of "ContainerAppsSessionPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SessionPoolResource + SessionPoolCollection collection = resourceGroupResource.GetSessionPools(); + + // invoke the operation + string sessionPoolName = "testsessionpool"; + SessionPoolData data = new SessionPoolData(new AzureLocation("East US")) + { + ContainerType = new ContainerType("Shell"), + PoolManagementType = PoolManagementType.Dynamic, + ScaleConfiguration = new SessionPoolScaleConfiguration + { + MaxConcurrentSessions = 50, + }, + DynamicPoolLifecycleConfiguration = new SessionPoolLifecycleConfiguration + { + LifecycleType = SessionPoolLifecycleType.Timed, + CooldownPeriodInSeconds = 600, + }, + SessionNetworkStatus = SessionNetworkStatus.EgressEnabled, + McpServerSettings = new McpServerSettings + { + IsMcpServerEnabled = true, + IsMcpServerApiKeyDisabled = false, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sessionPoolName, data); + SessionPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SessionPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateSessionPoolWithLifecycleOnContainerExitTimed() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_LifecycleOnContainerExit_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_LifecycleOnContainerExit_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsSessionPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +153,7 @@ public async Task CreateOrUpdate_CreateOrUpdateSessionPoolWithLifecycleOnContain [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateSessionPoolWithLifecycleTypeTimed() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_LifecycleTimed_CreateOrUpdate.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_LifecycleTimed_CreateOrUpdate.json // this example is just showing the usage of "ContainerAppsSessionPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,8 +186,8 @@ public async Task CreateOrUpdate_CreateOrUpdateSessionPoolWithLifecycleTypeTimed }, DynamicPoolLifecycleConfiguration = new SessionPoolLifecycleConfiguration { - LifecycleType = SessionPoolLifecycleType.OnContainerExit, - MaxAlivePeriodInSeconds = 86400, + LifecycleType = SessionPoolLifecycleType.Timed, + CooldownPeriodInSeconds = 600, }, CustomContainerTemplate = new CustomContainerTemplate { @@ -176,7 +230,40 @@ public async Task CreateOrUpdate_CreateOrUpdateSessionPoolWithLifecycleTypeTimed [Ignore("Only validating compilation of examples")] public async Task Get_GetSessionPool() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get.json + // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SessionPoolResource + SessionPoolCollection collection = resourceGroupResource.GetSessionPools(); + + // invoke the operation + string sessionPoolName = "testsessionpool"; + SessionPoolResource result = await collection.GetAsync(sessionPoolName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SessionPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetSessionPoolDuringUpdate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get_InProgress.json // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +296,7 @@ public async Task Get_GetSessionPool() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSessionPoolsByResourceGroup() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_ListByResourceGroup.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_ListByResourceGroup.json // this example is just showing the usage of "ContainerAppsSessionPools_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +331,36 @@ public async Task GetAll_ListSessionPoolsByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSessionPool() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get.json + // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SessionPoolResource + SessionPoolCollection collection = resourceGroupResource.GetSessionPools(); + + // invoke the operation + string sessionPoolName = "testsessionpool"; + bool result = await collection.ExistsAsync(sessionPoolName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetSessionPoolDuringUpdate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get_InProgress.json // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -273,7 +389,48 @@ public async Task Exists_GetSessionPool() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSessionPool() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get.json + // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SessionPoolResource + SessionPoolCollection collection = resourceGroupResource.GetSessionPools(); + + // invoke the operation + string sessionPoolName = "testsessionpool"; + NullableResponse response = await collection.GetIfExistsAsync(sessionPoolName); + SessionPoolResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SessionPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetSessionPoolDuringUpdate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get_InProgress.json // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolResource.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolResource.cs index 9bfa39986184..d93ee9491cdb 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolResource.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SessionPoolResource.cs @@ -20,7 +20,37 @@ public partial class Sample_SessionPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSessionPool() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get.json + // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SessionPoolResource created on azure + // for more information of creating SessionPoolResource, please refer to the document of SessionPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string sessionPoolName = "testsessionpool"; + ResourceIdentifier sessionPoolResourceId = SessionPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sessionPoolName); + SessionPoolResource sessionPool = client.GetSessionPoolResource(sessionPoolResourceId); + + // invoke the operation + SessionPoolResource result = await sessionPool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SessionPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetSessionPoolDuringUpdate() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Get_InProgress.json // this example is just showing the usage of "ContainerAppsSessionPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +80,7 @@ public async Task Get_GetSessionPool() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteSessionPool() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_Delete.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Delete.json // this example is just showing the usage of "ContainerAppsSessionPools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +106,7 @@ public async Task Delete_DeleteSessionPool() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateSessionPool() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_Patch.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_Patch.json // this example is just showing the usage of "ContainerAppsSessionPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,6 +130,11 @@ public async Task Update_UpdateSessionPool() MaxConcurrentSessions = 500, ReadySessionInstances = 100, }, + DynamicPoolLifecycleConfiguration = new SessionPoolLifecycleConfiguration + { + LifecycleType = SessionPoolLifecycleType.Timed, + CooldownPeriodInSeconds = 600, + }, CustomContainerTemplate = new CustomContainerTemplate { Containers = {new SessionContainer @@ -127,5 +162,57 @@ public async Task Update_UpdateSessionPool() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task FetchMcpServerCredentials_FetchSessionPoolMCPServerCredentials() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_FetchMcpServerCredentials.json + // this example is just showing the usage of "ContainerAppsSessionPools_FetchMcpServerCredentials" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SessionPoolResource created on azure + // for more information of creating SessionPoolResource, please refer to the document of SessionPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string sessionPoolName = "testsessionpool"; + ResourceIdentifier sessionPoolResourceId = SessionPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sessionPoolName); + SessionPoolResource sessionPool = client.GetSessionPoolResource(sessionPoolResourceId); + + // invoke the operation + McpServerCredential result = await sessionPool.FetchMcpServerCredentialsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RotateMcpServerCredentials_RotateSessionPoolMCPServerCredentials() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_RotateMcpServerCredentials.json + // this example is just showing the usage of "ContainerAppsSessionPools_RotateMcpServerCredentials" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SessionPoolResource created on azure + // for more information of creating SessionPoolResource, please refer to the document of SessionPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string sessionPoolName = "testsessionpool"; + ResourceIdentifier sessionPoolResourceId = SessionPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sessionPoolName); + SessionPoolResource sessionPool = client.GetSessionPoolResource(sessionPoolResourceId); + + // invoke the operation + McpServerCredential result = await sessionPool.RotateMcpServerCredentialsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 800b8ba3e3c2..5ea982fa455b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetAvailableWorkloadProfiles_BillingMetersGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/AvailableWorkloadProfiles_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/AvailableWorkloadProfiles_Get.json // this example is just showing the usage of "AvailableWorkloadProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetAvailableWorkloadProfiles_BillingMetersGet() [Ignore("Only validating compilation of examples")] public async Task GetBillingMeters_BillingMetersGet() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/BillingMeters_Get.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/BillingMeters_Get.json // this example is just showing the usage of "BillingMeters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,11 +73,42 @@ public async Task GetBillingMeters_BillingMetersGet() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetBuilderResources_BuildersListBySubscription0() + { + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Builders_ListBySubscription.json + // this example is just showing the usage of "Builders_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (BuilderResource item in subscriptionResource.GetBuilderResourcesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BuilderResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetContainerAppConnectedEnvironments_ListConnectedEnvironmentsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ConnectedEnvironments_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ConnectedEnvironments_ListBySubscription.json // this example is just showing the usage of "ConnectedEnvironments_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +139,7 @@ public async Task GetContainerAppConnectedEnvironments_ListConnectedEnvironments [Ignore("Only validating compilation of examples")] public async Task GetContainerApps_ListContainerAppsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ContainerApps_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ContainerApps_ListBySubscription.json // this example is just showing the usage of "ContainerApps_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +170,7 @@ public async Task GetContainerApps_ListContainerAppsBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetContainerAppJobs_ListContainerAppsJobsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Jobs_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Jobs_ListBySubscription.json // this example is just showing the usage of "Jobs_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +201,7 @@ public async Task GetContainerAppJobs_ListContainerAppsJobsBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetCustomDomainVerificationId_ListAllOperations() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Subscriptions_GetCustomDomainVerificationId.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Subscriptions_GetCustomDomainVerificationId.json // this example is just showing the usage of "GetCustomDomainVerificationId" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,7 +225,7 @@ public async Task GetCustomDomainVerificationId_ListAllOperations() [Ignore("Only validating compilation of examples")] public async Task GetContainerAppManagedEnvironments_ListEnvironmentsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/ManagedEnvironments_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/ManagedEnvironments_ListBySubscription.json // this example is just showing the usage of "ManagedEnvironments_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -225,7 +256,7 @@ public async Task GetContainerAppManagedEnvironments_ListEnvironmentsBySubscript [Ignore("Only validating compilation of examples")] public async Task GetSessionPools_ListSessionPoolsBySubscription() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/SessionPools_ListBySubscription.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/SessionPools_ListBySubscription.json // this example is just showing the usage of "ContainerAppsSessionPools_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -256,7 +287,7 @@ public async Task GetSessionPools_ListSessionPoolsBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetUsages_ListUsages() { - // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/stable/2025-07-01/examples/Usages_List.json + // Generated from example definition: specification/app/resource-manager/Microsoft.App/ContainerApps/preview/2025-10-02-preview/examples/Usages_List.json // this example is just showing the usage of "Usages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line