diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/metadata.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/metadata.json index a861545c15d4..8e3b1930ff5c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/metadata.json +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/metadata.json @@ -1,5 +1,5 @@ { "apiVersions": { - "Microsoft.ServiceFabric": "2026-02-01" + "Microsoft.ServiceFabric": "2026-05-01-preview" } } \ No newline at end of file diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs index 073849828f63..0e7803ffc42d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs @@ -507,6 +507,75 @@ public static ServiceFabricManagedClusterPatch ServiceFabricManagedClusterPatch( return new ServiceFabricManagedClusterPatch(tags, additionalBinaryDataProperties: null); } + /// Parameters for Fault Simulation id. + /// unique identifier for the fault simulation. + /// A new instance for mocking. + public static FaultSimulationIdContent FaultSimulationIdContent(string simulationId = default) + { + return new FaultSimulationIdContent(simulationId, additionalBinaryDataProperties: null); + } + + /// Fault simulation object with status. + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// A new instance for mocking. + public static FaultSimulation FaultSimulation(string simulationId = default, FaultSimulationStatus? status = default, DateTimeOffset? startOn = default, DateTimeOffset? endOn = default, FaultSimulationDetails details = default) + { + return new FaultSimulation( + simulationId, + status, + startOn, + endOn, + details, + additionalBinaryDataProperties: null); + } + + /// Details for Fault Simulation. + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// Fault simulation parameters. + /// A new instance for mocking. + public static FaultSimulationDetails FaultSimulationDetails(string clusterId = default, string operationId = default, IEnumerable nodeTypeFaultSimulation = default, FaultSimulationContent parameters = default) + { + nodeTypeFaultSimulation ??= new ChangeTrackingList(); + + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation.ToList(), parameters, additionalBinaryDataProperties: null); + } + + /// Node type fault simulation object with status. + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// A new instance for mocking. + public static NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = default, FaultSimulationStatus? status = default, string operationId = default, SfmcOperationStatus? operationStatus = default) + { + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, additionalBinaryDataProperties: null); + } + + /// Force the action to go through without any check on the cluster. + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + /// Indicates the zones of the fault simulation. + /// A new instance for mocking. + public static ZoneFaultSimulationContent ZoneFaultSimulationContent(bool? isForced = default, DateTimeOffset? constraintsExpireOn = default, IEnumerable zones = default) + { + zones ??= new ChangeTrackingList(); + + return new ZoneFaultSimulationContent(FaultKind.Zone, isForced, constraintsExpireOn is null ? default : new FaultSimulationConstraints(constraintsExpireOn, null), additionalBinaryDataProperties: null, zones.ToList()); + } + + /// Fault Simulation Request for Start action. + /// Parameters for Fault Simulation start action. + /// A new instance for mocking. + public static FaultSimulationContentWrapper FaultSimulationContentWrapper(FaultSimulationContent parameters = default) + { + return new FaultSimulationContentWrapper(parameters, additionalBinaryDataProperties: null); + } + /// Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters. /// List of Managed VM Sizes for Service Fabric Managed Clusters. /// URL to get the next set of Managed VM Sizes if there are any. @@ -608,11 +677,13 @@ public static ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool /// Setting this to true allows stateless node types to scale out without equal distribution across zones. /// Specifies the node type should be configured for only outbound traffic and not inbound traffic. /// Specifies whether the node type should use a resilient ephemeral OS disk when using a supported SKU size. A resilient ephemeral OS disk provides improved reliability for ephemeral OS disks by enabling full caching. + /// Specifies the settings for the proxy agent on the node type. /// The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The scale in policy mode for a node type. /// Resource tags. /// The node type sku. /// A new instance for mocking. - public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, bool? isPrimary = default, int? vmInstanceCount = default, int? dataDiskSizeInGB = default, ServiceFabricManagedDataDiskType? dataDiskType = default, string dataDiskLetter = default, IDictionary placementProperties = default, IDictionary capacities = default, EndpointRangeDescription applicationPorts = default, EndpointRangeDescription ephemeralPorts = default, string vmSize = default, string vmImagePublisher = default, string vmImageOffer = default, string vmImageSku = default, string vmImageVersion = default, IEnumerable vmSecrets = default, IEnumerable vmExtensions = default, bool? isStateless = default, bool? hasMultiplePlacementGroups = default, IEnumerable frontendConfigurations = default, IEnumerable networkSecurityRules = default, IEnumerable additionalDataDisks = default, bool? isEncryptionAtHostEnabled = default, ServiceFabricManagedResourceProvisioningState? provisioningState = default, bool? isAcceleratedNetworkingEnabled = default, bool? useDefaultPublicLoadBalancer = default, bool? useTempDataDisk = default, bool? isOverProvisioningEnabled = default, IEnumerable zones = default, bool? isSpotVm = default, string hostGroupId = default, bool? useEphemeralOSDisk = default, string spotRestoreTimeout = default, SpotNodeVmEvictionPolicyType? evictionPolicy = default, ResourceIdentifier vmImageResourceId = default, ResourceIdentifier subnetId = default, IEnumerable vmSetupActions = default, ServiceFabricManagedClusterSecurityType? securityType = default, NodeTypeSecurityEncryptionType? securityEncryptionType = default, bool? isSecureBootEnabled = default, bool? isNodePublicIPEnabled = default, bool? isNodePublicIPv6Enabled = default, ResourceIdentifier vmSharedGalleryImageId = default, ResourceIdentifier natGatewayId = default, IEnumerable natConfigurations = default, VmImagePlan vmImagePlan = default, ResourceIdentifier serviceArtifactReferenceId = default, ResourceIdentifier dscpConfigurationId = default, IEnumerable additionalNetworkInterfaceConfigurations = default, string computerNamePrefix = default, IEnumerable vmApplications = default, bool? isZoneBalanceEnabled = default, bool? isOutboundOnly = default, bool? enableResilientEphemeralOsDisk = default, IEnumerable vmManagedIdentityUserAssignedIdentities = default, IDictionary tags = default, NodeTypeSku sku = default) + public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, bool? isPrimary = default, int? vmInstanceCount = default, int? dataDiskSizeInGB = default, ServiceFabricManagedDataDiskType? dataDiskType = default, string dataDiskLetter = default, IDictionary placementProperties = default, IDictionary capacities = default, EndpointRangeDescription applicationPorts = default, EndpointRangeDescription ephemeralPorts = default, string vmSize = default, string vmImagePublisher = default, string vmImageOffer = default, string vmImageSku = default, string vmImageVersion = default, IEnumerable vmSecrets = default, IEnumerable vmExtensions = default, bool? isStateless = default, bool? hasMultiplePlacementGroups = default, IEnumerable frontendConfigurations = default, IEnumerable networkSecurityRules = default, IEnumerable additionalDataDisks = default, bool? isEncryptionAtHostEnabled = default, ServiceFabricManagedResourceProvisioningState? provisioningState = default, bool? isAcceleratedNetworkingEnabled = default, bool? useDefaultPublicLoadBalancer = default, bool? useTempDataDisk = default, bool? isOverProvisioningEnabled = default, IEnumerable zones = default, bool? isSpotVm = default, string hostGroupId = default, bool? useEphemeralOSDisk = default, string spotRestoreTimeout = default, SpotNodeVmEvictionPolicyType? evictionPolicy = default, ResourceIdentifier vmImageResourceId = default, ResourceIdentifier subnetId = default, IEnumerable vmSetupActions = default, ServiceFabricManagedClusterSecurityType? securityType = default, NodeTypeSecurityEncryptionType? securityEncryptionType = default, bool? isSecureBootEnabled = default, bool? isNodePublicIPEnabled = default, bool? isNodePublicIPv6Enabled = default, ResourceIdentifier vmSharedGalleryImageId = default, ResourceIdentifier natGatewayId = default, IEnumerable natConfigurations = default, VmImagePlan vmImagePlan = default, ResourceIdentifier serviceArtifactReferenceId = default, ResourceIdentifier dscpConfigurationId = default, IEnumerable additionalNetworkInterfaceConfigurations = default, string computerNamePrefix = default, IEnumerable vmApplications = default, bool? isZoneBalanceEnabled = default, bool? isOutboundOnly = default, bool? enableResilientEphemeralOsDisk = default, ProxyAgentSettings proxyAgentSettings = default, IEnumerable vmManagedIdentityUserAssignedIdentities = default, ScaleInPolicyMode? scaleInMode = default, IDictionary tags = default, NodeTypeSku sku = default) { tags ??= new ChangeTrackingDictionary(); @@ -622,7 +693,7 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( resourceType, systemData, additionalBinaryDataProperties: null, - isPrimary is null && vmInstanceCount is null && dataDiskSizeInGB is null && dataDiskType is null && dataDiskLetter is null && placementProperties is null && capacities is null && applicationPorts is null && ephemeralPorts is null && vmSize is null && vmImagePublisher is null && vmImageOffer is null && vmImageSku is null && vmImageVersion is null && vmSecrets is null && vmExtensions is null && isStateless is null && hasMultiplePlacementGroups is null && frontendConfigurations is null && networkSecurityRules is null && additionalDataDisks is null && isEncryptionAtHostEnabled is null && provisioningState is null && isAcceleratedNetworkingEnabled is null && useDefaultPublicLoadBalancer is null && useTempDataDisk is null && isOverProvisioningEnabled is null && zones is null && isSpotVm is null && hostGroupId is null && useEphemeralOSDisk is null && spotRestoreTimeout is null && evictionPolicy is null && vmImageResourceId is null && subnetId is null && vmSetupActions is null && securityType is null && securityEncryptionType is null && isSecureBootEnabled is null && isNodePublicIPEnabled is null && isNodePublicIPv6Enabled is null && vmSharedGalleryImageId is null && natGatewayId is null && natConfigurations is null && vmImagePlan is null && serviceArtifactReferenceId is null && dscpConfigurationId is null && additionalNetworkInterfaceConfigurations is null && computerNamePrefix is null && vmApplications is null && isZoneBalanceEnabled is null && isOutboundOnly is null && enableResilientEphemeralOsDisk is null && vmManagedIdentityUserAssignedIdentities is null ? default : new ServiceFabricManagedNodeTypeProperties( + isPrimary is null && vmInstanceCount is null && dataDiskSizeInGB is null && dataDiskType is null && dataDiskLetter is null && placementProperties is null && capacities is null && applicationPorts is null && ephemeralPorts is null && vmSize is null && vmImagePublisher is null && vmImageOffer is null && vmImageSku is null && vmImageVersion is null && vmSecrets is null && vmExtensions is null && isStateless is null && hasMultiplePlacementGroups is null && frontendConfigurations is null && networkSecurityRules is null && additionalDataDisks is null && isEncryptionAtHostEnabled is null && provisioningState is null && isAcceleratedNetworkingEnabled is null && useDefaultPublicLoadBalancer is null && useTempDataDisk is null && isOverProvisioningEnabled is null && zones is null && isSpotVm is null && hostGroupId is null && useEphemeralOSDisk is null && spotRestoreTimeout is null && evictionPolicy is null && vmImageResourceId is null && subnetId is null && vmSetupActions is null && securityType is null && securityEncryptionType is null && isSecureBootEnabled is null && isNodePublicIPEnabled is null && isNodePublicIPv6Enabled is null && vmSharedGalleryImageId is null && natGatewayId is null && natConfigurations is null && vmImagePlan is null && serviceArtifactReferenceId is null && dscpConfigurationId is null && additionalNetworkInterfaceConfigurations is null && computerNamePrefix is null && vmApplications is null && isZoneBalanceEnabled is null && isOutboundOnly is null && enableResilientEphemeralOsDisk is null && proxyAgentSettings is null && vmManagedIdentityUserAssignedIdentities is null && scaleInMode is null ? default : new ServiceFabricManagedNodeTypeProperties( isPrimary.GetValueOrDefault(), vmInstanceCount.GetValueOrDefault(), dataDiskSizeInGB, @@ -677,6 +748,8 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( isZoneBalanceEnabled, isOutboundOnly, enableResilientEphemeralOsDisk, + new ScaleInPolicy(scaleInMode, null), + proxyAgentSettings, null), tags, sku); @@ -795,6 +868,73 @@ public static NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = default, in return new NodeTypeSkuCapacity(minimum, maximum, @default, scaleType, additionalBinaryDataProperties: null); } + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. + /// The number of nodes in the node type. Values: -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. + /// Disk size for the managed disk attached to the vms on the node type in GBs. + /// Managed data disk type. Specifies the storage account type for the managed disk. + /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. + /// The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. + /// The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. + /// The range of ports from which cluster assigned port to Service Fabric applications. + /// The range of ephemeral ports that nodes in this node type should be configured with. + /// The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3. + /// The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. + /// The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. + /// The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. + /// The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. + /// The secrets to install in the virtual machines. + /// Set of extensions that should be installed onto the virtual machines. + /// Indicates if the node type can only host Stateless workloads. + /// Indicates if scale set associated with the node type can be composed of multiple placement groups. + /// Indicates the node type uses its own frontend configurations instead of the default one for the cluster. This setting can only be specified for non-primary node types and can not be added or removed after the node type is created. + /// The Network Security Rules for this node type. This setting can only be specified for node types that are configured with frontend configurations. + /// Additional managed data disks. + /// Enable or disable the Host Encryption for the virtual machines on the node type. This will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource. + /// The provisioning state of the node type resource. + /// Specifies whether the network interface is accelerated networking-enabled. + /// Specifies whether the use public load balancer. If not specified and the node type doesn't have its own frontend configuration, it will be attached to the default load balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is true, then the frontend has to be an Internal Load Balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is false or not set, then the custom load balancer must include a public load balancer to provide outbound connectivity. + /// Specifies whether to use the temporary disk for the service fabric data root, in which case no managed data disk will be attached and the temporary disk will be used. It is only allowed for stateless node types. + /// Specifies whether the node type should be overprovisioned. It is only allowed for stateless node types. + /// Specifies the availability zones where the node type would span across. If the cluster is not spanning across availability zones, initiates az migration for the cluster. + /// Indicates whether the node type will be Spot Virtual Machines. Azure will allocate the VMs if there is capacity available and the VMs can be evicted at any time. + /// Specifies the full host group resource Id. This property is used for deploying on azure dedicated hosts. + /// Indicates whether to use ephemeral os disk. The sku selected on the vmSize property needs to support this feature. + /// Indicates the time duration after which the platform will not try to restore the VMSS SPOT instances specified as ISO 8601. + /// Specifies the eviction policy for virtual machines in a SPOT node type. Default is Delete. + /// Indicates the resource id of the vm image. This parameter is used for custom vm image. + /// Indicates the resource id of the subnet for the node type. + /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. + /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. + /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. + /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. + /// Specifies the resource id of a NAT Gateway to attach to the subnet of this node type. Node type must use custom load balancer. + /// Specifies the NAT configuration on default public Load Balancer for the node type. This is only supported for node types use the default public Load Balancer. + /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. + /// Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. + /// Specifies the resource id of the DSCP configuration to apply to the node type network interface. + /// Specifies the settings for any additional secondary network interfaces to attach to the node type. + /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. + /// Specifies the gallery applications that should be made available to the underlying VMSS. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + /// Specifies the node type should be configured for only outbound traffic and not inbound traffic. + /// Specifies whether the node type should use a resilient ephemeral OS disk when using a supported SKU size. A resilient ephemeral OS disk provides improved reliability for ephemeral OS disks by enabling full caching. + /// The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// Resource tags. + /// The node type sku. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IEnumerable vmSecrets, IEnumerable vmExtensions, bool? isStateless, bool? hasMultiplePlacementGroups, IEnumerable frontendConfigurations, IEnumerable networkSecurityRules, IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IEnumerable vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, NodeTypeSecurityEncryptionType? securityEncryptionType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IEnumerable natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, IEnumerable vmApplications, bool? isZoneBalanceEnabled, bool? isOutboundOnly, bool? enableResilientEphemeralOsDisk, IEnumerable vmManagedIdentityUserAssignedIdentities, IDictionary tags, NodeTypeSku sku) + { + return ServiceFabricManagedNodeTypeData(id: id, name: name, resourceType: resourceType, systemData: systemData, isPrimary: isPrimary, vmInstanceCount: vmInstanceCount, dataDiskSizeInGB: dataDiskSizeInGB, dataDiskType: dataDiskType, dataDiskLetter: dataDiskLetter, placementProperties: placementProperties, capacities: capacities, applicationPorts: applicationPorts, ephemeralPorts: ephemeralPorts, vmSize: vmSize, vmImagePublisher: vmImagePublisher, vmImageOffer: vmImageOffer, vmImageSku: vmImageSku, vmImageVersion: vmImageVersion, vmSecrets: vmSecrets, vmExtensions: vmExtensions, isStateless: isStateless, hasMultiplePlacementGroups: hasMultiplePlacementGroups, frontendConfigurations: frontendConfigurations, networkSecurityRules: networkSecurityRules, additionalDataDisks: additionalDataDisks, isEncryptionAtHostEnabled: isEncryptionAtHostEnabled, provisioningState: provisioningState, isAcceleratedNetworkingEnabled: isAcceleratedNetworkingEnabled, useDefaultPublicLoadBalancer: useDefaultPublicLoadBalancer, useTempDataDisk: useTempDataDisk, isOverProvisioningEnabled: isOverProvisioningEnabled, zones: zones, isSpotVm: isSpotVm, hostGroupId: hostGroupId, useEphemeralOSDisk: useEphemeralOSDisk, spotRestoreTimeout: spotRestoreTimeout, evictionPolicy: evictionPolicy, vmImageResourceId: vmImageResourceId, subnetId: subnetId, vmSetupActions: vmSetupActions, securityType: securityType, securityEncryptionType: securityEncryptionType, isSecureBootEnabled: isSecureBootEnabled, isNodePublicIPEnabled: isNodePublicIPEnabled, isNodePublicIPv6Enabled: isNodePublicIPv6Enabled, vmSharedGalleryImageId: vmSharedGalleryImageId, natGatewayId: natGatewayId, natConfigurations: natConfigurations, vmImagePlan: vmImagePlan, serviceArtifactReferenceId: serviceArtifactReferenceId, dscpConfigurationId: dscpConfigurationId, additionalNetworkInterfaceConfigurations: additionalNetworkInterfaceConfigurations, computerNamePrefix: computerNamePrefix, vmApplications: vmApplications, isZoneBalanceEnabled: isZoneBalanceEnabled, isOutboundOnly: isOutboundOnly, enableResilientEphemeralOsDisk: enableResilientEphemeralOsDisk, proxyAgentSettings: default, vmManagedIdentityUserAssignedIdentities: vmManagedIdentityUserAssignedIdentities, scaleInMode: default, tags: tags, sku: sku); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1069,6 +1209,8 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( default, default, default, + default, + default, default), tags, sku); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedClustersGetFaultSimulationAsyncCollectionResultOfT.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedClustersGetFaultSimulationAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..e94a476e46f7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedClustersGetFaultSimulationAsyncCollectionResultOfT.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; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class ManagedClustersGetFaultSimulationAsyncCollectionResultOfT : AsyncPageable + { + private readonly ManagedClusters _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _clusterName; + private readonly RequestContext _context; + private readonly string _diagnosticScope; + + /// Initializes a new instance of ManagedClustersGetFaultSimulationAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The ManagedClusters client used to send requests. + /// 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 cluster resource. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The diagnostic scope name. + public ManagedClustersGetFaultSimulationAsyncCollectionResultOfT(ManagedClusters client, string subscriptionId, string resourceGroupName, string clusterName, RequestContext context, string diagnosticScope) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _clusterName = clusterName; + _context = context; + _diagnosticScope = diagnosticScope; + } + + /// Gets the pages of ManagedClustersGetFaultSimulationAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of ManagedClustersGetFaultSimulationAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + FaultSimulationListResult result = FaultSimulationListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.IsAbsoluteUri == true ? nextPage.AbsoluteUri : nextPage?.OriginalString, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetFaultSimulationRequest(nextLink, _subscriptionId, _resourceGroupName, _clusterName, _context) : _client.CreateGetFaultSimulationRequest(_subscriptionId, _resourceGroupName, _clusterName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope(_diagnosticScope); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedClustersGetFaultSimulationCollectionResultOfT.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedClustersGetFaultSimulationCollectionResultOfT.cs new file mode 100644 index 000000000000..7ebbba7942cf --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedClustersGetFaultSimulationCollectionResultOfT.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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class ManagedClustersGetFaultSimulationCollectionResultOfT : Pageable + { + private readonly ManagedClusters _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _clusterName; + private readonly RequestContext _context; + private readonly string _diagnosticScope; + + /// Initializes a new instance of ManagedClustersGetFaultSimulationCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The ManagedClusters client used to send requests. + /// 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 cluster resource. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The diagnostic scope name. + public ManagedClustersGetFaultSimulationCollectionResultOfT(ManagedClusters client, string subscriptionId, string resourceGroupName, string clusterName, RequestContext context, string diagnosticScope) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _clusterName = clusterName; + _context = context; + _diagnosticScope = diagnosticScope; + } + + /// Gets the pages of ManagedClustersGetFaultSimulationCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of ManagedClustersGetFaultSimulationCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + FaultSimulationListResult result = FaultSimulationListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.IsAbsoluteUri == true ? nextPage.AbsoluteUri : nextPage?.OriginalString, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetFaultSimulationRequest(nextLink, _subscriptionId, _resourceGroupName, _clusterName, _context) : _client.CreateGetFaultSimulationRequest(_subscriptionId, _resourceGroupName, _clusterName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope(_diagnosticScope); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesAsyncCollectionResultOfT.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesAsyncCollectionResultOfT.cs index 4c84dd3c8bb8..7701e7edd6eb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesAsyncCollectionResultOfT.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesAsyncCollectionResultOfT.cs @@ -26,7 +26,7 @@ internal partial class ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesAsyn /// Initializes a new instance of ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The ManagedUnsupportedVMSizes client used to send requests. /// The ID of the target subscription. The value must be an UUID. - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// The diagnostic scope name. public ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesAsyncCollectionResultOfT(ManagedUnsupportedVMSizes client, string subscriptionId, AzureLocation location, RequestContext context, string diagnosticScope) : base(context?.CancellationToken ?? default) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesCollectionResultOfT.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesCollectionResultOfT.cs index 11ebf555429f..64a56ad1dc36 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesCollectionResultOfT.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesCollectionResultOfT.cs @@ -25,7 +25,7 @@ internal partial class ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesColl /// Initializes a new instance of ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesCollectionResultOfT, which is used to iterate over the pages of a collection. /// The ManagedUnsupportedVMSizes client used to send requests. /// The ID of the target subscription. The value must be an UUID. - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// The diagnostic scope name. public ManagedUnsupportedVMSizesGetManagedUnsupportedVmSizesCollectionResultOfT(ManagedUnsupportedVMSizes client, string subscriptionId, AzureLocation location, RequestContext context, string diagnosticScope) : base(context?.CancellationToken ?? default) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/NodeTypesGetFaultSimulationAsyncCollectionResultOfT.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/NodeTypesGetFaultSimulationAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..0318a3d16138 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/NodeTypesGetFaultSimulationAsyncCollectionResultOfT.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class NodeTypesGetFaultSimulationAsyncCollectionResultOfT : AsyncPageable + { + private readonly NodeTypes _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _clusterName; + private readonly string _nodeTypeName; + private readonly RequestContext _context; + private readonly string _diagnosticScope; + + /// Initializes a new instance of NodeTypesGetFaultSimulationAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The NodeTypes client used to send requests. + /// 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 cluster resource. + /// The name of the node type. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The diagnostic scope name. + public NodeTypesGetFaultSimulationAsyncCollectionResultOfT(NodeTypes client, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, RequestContext context, string diagnosticScope) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _clusterName = clusterName; + _nodeTypeName = nodeTypeName; + _context = context; + _diagnosticScope = diagnosticScope; + } + + /// Gets the pages of NodeTypesGetFaultSimulationAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of NodeTypesGetFaultSimulationAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + FaultSimulationListResult result = FaultSimulationListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.IsAbsoluteUri == true ? nextPage.AbsoluteUri : nextPage?.OriginalString, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetFaultSimulationRequest(nextLink, _subscriptionId, _resourceGroupName, _clusterName, _nodeTypeName, _context) : _client.CreateGetFaultSimulationRequest(_subscriptionId, _resourceGroupName, _clusterName, _nodeTypeName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope(_diagnosticScope); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/NodeTypesGetFaultSimulationCollectionResultOfT.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/NodeTypesGetFaultSimulationCollectionResultOfT.cs new file mode 100644 index 000000000000..f70fabfd7b58 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/CollectionResults/NodeTypesGetFaultSimulationCollectionResultOfT.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class NodeTypesGetFaultSimulationCollectionResultOfT : Pageable + { + private readonly NodeTypes _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _clusterName; + private readonly string _nodeTypeName; + private readonly RequestContext _context; + private readonly string _diagnosticScope; + + /// Initializes a new instance of NodeTypesGetFaultSimulationCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The NodeTypes client used to send requests. + /// 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 cluster resource. + /// The name of the node type. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// The diagnostic scope name. + public NodeTypesGetFaultSimulationCollectionResultOfT(NodeTypes client, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, RequestContext context, string diagnosticScope) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _clusterName = clusterName; + _nodeTypeName = nodeTypeName; + _context = context; + _diagnosticScope = diagnosticScope; + } + + /// Gets the pages of NodeTypesGetFaultSimulationCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of NodeTypesGetFaultSimulationCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + FaultSimulationListResult result = FaultSimulationListResult.FromResponse(response); + yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.IsAbsoluteUri == true ? nextPage.AbsoluteUri : nextPage?.OriginalString, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetFaultSimulationRequest(nextLink, _subscriptionId, _resourceGroupName, _clusterName, _nodeTypeName, _context) : _client.CreateGetFaultSimulationRequest(_subscriptionId, _resourceGroupName, _clusterName, _nodeTypeName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope(_diagnosticScope); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs index 434ef040fa1b..ea6c8dfdf6d5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs @@ -51,7 +51,7 @@ public virtual ServiceFabricManagedClusterCollection GetServiceFabricManagedClus /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -80,7 +80,7 @@ public virtual async Task> GetServ /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs index e502a37c6621..fcb7739dbbbe 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs @@ -42,15 +42,15 @@ internal MockableServiceFabricManagedClustersSubscriptionResource(ArmClient clie private ClientDiagnostics ManagedClustersClientDiagnostics => _managedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ManagedClusters ManagedClustersRestClient => _managedClustersRestClient ??= new ManagedClusters(ManagedClustersClientDiagnostics, Pipeline, Endpoint, "2026-02-01"); + private ManagedClusters ManagedClustersRestClient => _managedClustersRestClient ??= new ManagedClusters(ManagedClustersClientDiagnostics, Pipeline, Endpoint, "2026-05-01-preview"); private ClientDiagnostics ManagedClusterVersionClientDiagnostics => _managedClusterVersionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ManagedClusterVersion ManagedClusterVersionRestClient => _managedClusterVersionRestClient ??= new ManagedClusterVersion(ManagedClusterVersionClientDiagnostics, Pipeline, Endpoint, "2026-02-01"); + private ManagedClusterVersion ManagedClusterVersionRestClient => _managedClusterVersionRestClient ??= new ManagedClusterVersion(ManagedClusterVersionClientDiagnostics, Pipeline, Endpoint, "2026-05-01-preview"); private ClientDiagnostics ManagedUnsupportedVMSizesClientDiagnostics => _managedUnsupportedVMSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ManagedUnsupportedVMSizes ManagedUnsupportedVMSizesRestClient => _managedUnsupportedVMSizesRestClient ??= new ManagedUnsupportedVMSizes(ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, Endpoint, "2026-02-01"); + private ManagedUnsupportedVMSizes ManagedUnsupportedVMSizesRestClient => _managedUnsupportedVMSizesRestClient ??= new ManagedUnsupportedVMSizes(ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, Endpoint, "2026-05-01-preview"); /// /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. @@ -65,7 +65,7 @@ internal MockableServiceFabricManagedClustersSubscriptionResource(ArmClient clie /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -93,7 +93,7 @@ public virtual AsyncPageable GetServiceFabr /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -121,7 +121,7 @@ public virtual Pageable GetServiceFabricMan /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -171,7 +171,7 @@ public virtual async Task> GetManag /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -221,7 +221,7 @@ public virtual Response GetManagedClusterVer /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -272,7 +272,7 @@ public virtual async Task> GetManag /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -323,11 +323,11 @@ public virtual Response GetManagedClusterVer /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// VM Size name. /// The cancellation token to use. /// is null. @@ -373,11 +373,11 @@ public virtual async Task> GetMa /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// VM Size name. /// The cancellation token to use. /// is null. @@ -423,11 +423,11 @@ public virtual Response GetManagedUnsuppo /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetManagedUnsupportedVmSizesAsync(AzureLocation location, CancellationToken cancellationToken = default) @@ -452,11 +452,11 @@ public virtual AsyncPageable GetManagedUn /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetManagedUnsupportedVmSizes(AzureLocation location, CancellationToken cancellationToken = default) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs index 8a3ceeeb0a28..17134f0f7729 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs @@ -323,7 +323,7 @@ public static Response GetManagedClusterVers /// /// /// The the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// VM Size name. /// The cancellation token to use. /// is null. @@ -342,7 +342,7 @@ public static async Task> GetMan /// /// /// The the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// VM Size name. /// The cancellation token to use. /// is null. @@ -361,7 +361,7 @@ public static Response GetManagedUnsuppor /// /// /// The the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. @@ -380,7 +380,7 @@ public static AsyncPageable GetManagedUns /// /// /// The the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. + /// The location for the unsupported VM sizes. This is different from cluster location. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs new file mode 100644 index 000000000000..eb2d5fe4a3d6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + /// + internal partial class FaultSimulationOperationSource : IOperationSource + { + /// + internal FaultSimulationOperationSource() + { + } + + /// The response from the service. + /// The cancellation token to use. + /// + FaultSimulation IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The response from the service. + /// The cancellation token to use. + /// + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplyMaintenanceWindowRequest.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplyMaintenanceWindowRequest.Serialization.cs new file mode 100644 index 000000000000..1983214c7f52 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplyMaintenanceWindowRequest.Serialization.cs @@ -0,0 +1,174 @@ +// 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; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Describes the request to apply a maintenance window on a Service Fabric Managed Cluster. + public partial class ApplyMaintenanceWindowRequest : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ApplyMaintenanceWindowRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeApplyMaintenanceWindowRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplyMaintenanceWindowRequest)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ApplyMaintenanceWindowRequest)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ApplyMaintenanceWindowRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(ApplyMaintenanceWindowRequest applyMaintenanceWindowRequest) + { + if (applyMaintenanceWindowRequest == null) + { + return null; + } + return RequestContent.Create(applyMaintenanceWindowRequest, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplyMaintenanceWindowRequest)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(StartDateTime)) + { + writer.WritePropertyName("startDateTime"u8); + writer.WriteStringValue(StartDateTime); + } + if (Optional.IsDefined(Duration)) + { + writer.WritePropertyName("duration"u8); + writer.WriteStringValue(Duration); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ApplyMaintenanceWindowRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ApplyMaintenanceWindowRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplyMaintenanceWindowRequest)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplyMaintenanceWindowRequest(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ApplyMaintenanceWindowRequest DeserializeApplyMaintenanceWindowRequest(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string startDateTime = default; + string duration = default; + string timeZone = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("startDateTime"u8)) + { + startDateTime = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("duration"u8)) + { + duration = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("timeZone"u8)) + { + timeZone = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ApplyMaintenanceWindowRequest(startDateTime, duration, timeZone, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplyMaintenanceWindowRequest.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplyMaintenanceWindowRequest.cs new file mode 100644 index 000000000000..bc9b366496ed --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplyMaintenanceWindowRequest.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Describes the request to apply a maintenance window on a Service Fabric Managed Cluster. + public partial class ApplyMaintenanceWindowRequest + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ApplyMaintenanceWindowRequest() + { + } + + /// Initializes a new instance of . + /// Effective start date of the maintenance window in yyyy-MM-dd HH:mm format. If not provided, defaults to the current time. + /// Duration of the maintenance window in hh:mm format. If not provided, defaults to 5 hours. Example: 08:30 for 8 and a half hours. + /// Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. If not provided, defaults to UTC. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Central Australia Standard Time. + /// Keeps track of any properties unknown to the library. + internal ApplyMaintenanceWindowRequest(string startDateTime, string duration, string timeZone, IDictionary additionalBinaryDataProperties) + { + StartDateTime = startDateTime; + Duration = duration; + TimeZone = timeZone; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Effective start date of the maintenance window in yyyy-MM-dd HH:mm format. If not provided, defaults to the current time. + public string StartDateTime { get; set; } + + /// Duration of the maintenance window in hh:mm format. If not provided, defaults to 5 hours. Example: 08:30 for 8 and a half hours. + public string Duration { get; set; } + + /// Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. If not provided, defaults to UTC. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Central Australia Standard Time. + public string TimeZone { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AzureResourceManagerServiceFabricManagedClustersContext.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AzureResourceManagerServiceFabricManagedClustersContext.cs index 374e130c9e35..33859ede68fa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AzureResourceManagerServiceFabricManagedClustersContext.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AzureResourceManagerServiceFabricManagedClustersContext.cs @@ -30,11 +30,20 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters [ModelReaderWriterBuildable(typeof(ApplicationUpdateParametersProperties))] [ModelReaderWriterBuildable(typeof(ApplicationUpgradePolicy))] [ModelReaderWriterBuildable(typeof(ApplicationUserAssignedIdentityInfo))] + [ModelReaderWriterBuildable(typeof(ApplyMaintenanceWindowRequest))] [ModelReaderWriterBuildable(typeof(AveragePartitionLoadScalingTrigger))] [ModelReaderWriterBuildable(typeof(AverageServiceLoadScalingTrigger))] [ModelReaderWriterBuildable(typeof(ClusterFabricSettingsParameterDescription))] [ModelReaderWriterBuildable(typeof(ClusterFabricSettingsSection))] [ModelReaderWriterBuildable(typeof(EndpointRangeDescription))] + [ModelReaderWriterBuildable(typeof(FaultSimulation))] + [ModelReaderWriterBuildable(typeof(FaultSimulationConstraints))] + [ModelReaderWriterBuildable(typeof(FaultSimulationContent))] + [ModelReaderWriterBuildable(typeof(FaultSimulationContentWrapper))] + [ModelReaderWriterBuildable(typeof(FaultSimulationDetails))] + [ModelReaderWriterBuildable(typeof(FaultSimulationIdContent))] + [ModelReaderWriterBuildable(typeof(FaultSimulationListResult))] + [ModelReaderWriterBuildable(typeof(HostEndpointSettings))] [ModelReaderWriterBuildable(typeof(Models.ManagedAzResiliencyStatus))] [ModelReaderWriterBuildable(typeof(ManagedClusterAzureActiveDirectory))] [ModelReaderWriterBuildable(typeof(ManagedClusterClientCertificate))] @@ -65,6 +74,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters [ModelReaderWriterBuildable(typeof(NamedPartitionScheme))] [ModelReaderWriterBuildable(typeof(NodeTypeActionContent))] [ModelReaderWriterBuildable(typeof(NodeTypeAvailableSku))] + [ModelReaderWriterBuildable(typeof(NodeTypeFaultSimulation))] [ModelReaderWriterBuildable(typeof(NodeTypeFrontendConfiguration))] [ModelReaderWriterBuildable(typeof(NodeTypeListResult))] [ModelReaderWriterBuildable(typeof(NodeTypeListSkuResult))] @@ -77,6 +87,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters [ModelReaderWriterBuildable(typeof(NodeTypeVmssDataDisk))] [ModelReaderWriterBuildable(typeof(NodeTypeVmssExtension))] [ModelReaderWriterBuildable(typeof(PartitionInstanceCountScalingMechanism))] + [ModelReaderWriterBuildable(typeof(ProxyAgentSettings))] [ModelReaderWriterBuildable(typeof(ResourceAzStatus))] [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(RestartDeployedCodePackageContent))] @@ -86,6 +97,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters [ModelReaderWriterBuildable(typeof(RuntimeRollingUpgradeUpdateMonitoringPolicy))] [ModelReaderWriterBuildable(typeof(RuntimeServiceTypeHealthPolicy))] [ModelReaderWriterBuildable(typeof(RuntimeUpdateApplicationUpgradeContent))] + [ModelReaderWriterBuildable(typeof(ScaleInPolicy))] [ModelReaderWriterBuildable(typeof(ServiceFabricManagedApplicationData))] [ModelReaderWriterBuildable(typeof(ServiceFabricManagedApplicationPatch))] [ModelReaderWriterBuildable(typeof(ServiceFabricManagedApplicationResource))] @@ -127,6 +139,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters [ModelReaderWriterBuildable(typeof(Models.SubResource))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UniformInt64RangePartitionScheme))] + [ModelReaderWriterBuildable(typeof(UnknownFaultSimulationContent))] [ModelReaderWriterBuildable(typeof(UnknownManagedServiceProperties))] [ModelReaderWriterBuildable(typeof(UnknownPartition))] [ModelReaderWriterBuildable(typeof(UnknownScalingMechanism))] @@ -137,6 +150,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters [ModelReaderWriterBuildable(typeof(VmManagedIdentity))] [ModelReaderWriterBuildable(typeof(VmssExtensionProperties))] [ModelReaderWriterBuildable(typeof(WritableSubResource))] + [ModelReaderWriterBuildable(typeof(ZoneFaultSimulationContent))] public partial class AzureResourceManagerServiceFabricManagedClustersContext : ModelReaderWriterContext { } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs new file mode 100644 index 000000000000..175373de0c8d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// The kind of fault simulation. + internal readonly partial struct FaultKind : IEquatable + { + private readonly string _value; + /// Simulates an availability zone down. + private const string ZoneValue = "Zone"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public FaultKind(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Simulates an availability zone down. + public static FaultKind Zone { get; } = new FaultKind(ZoneValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(FaultKind left, FaultKind right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(FaultKind left, FaultKind right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator FaultKind(string value) => new FaultKind(value); + + /// Converts a string to a . + /// The value. + public static implicit operator FaultKind?(string value) => value == null ? null : new FaultKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultKind other && Equals(other); + + /// + public bool Equals(FaultKind 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs new file mode 100644 index 000000000000..585d28350ff4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.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.Text.Json; +using Azure; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation object with status. + public partial class FaultSimulation : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual FaultSimulation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static FaultSimulation FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulation(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulation)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(SimulationId)) + { + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteObjectValue(Details, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual FaultSimulation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulation)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulation(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FaultSimulation DeserializeFaultSimulation(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + FaultSimulationStatus? status = default; + DateTimeOffset? startOn = default; + DateTimeOffset? endOn = default; + FaultSimulationDetails details = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("simulationId"u8)) + { + simulationId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("startTime"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startOn = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("endTime"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endOn = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("details"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + details = FaultSimulationDetails.DeserializeFaultSimulationDetails(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FaultSimulation( + simulationId, + status, + startOn, + endOn, + details, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs new file mode 100644 index 000000000000..7c78cbcb298d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation object with status. + public partial class FaultSimulation + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal FaultSimulation() + { + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// Keeps track of any properties unknown to the library. + internal FaultSimulation(string simulationId, FaultSimulationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, FaultSimulationDetails details, IDictionary additionalBinaryDataProperties) + { + SimulationId = simulationId; + Status = status; + StartOn = startOn; + EndOn = endOn; + Details = details; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + + /// The start time of the fault simulation. + public DateTimeOffset? StartOn { get; } + + /// The end time of the fault simulation. + public DateTimeOffset? EndOn { get; } + + /// Fault simulation details. + public FaultSimulationDetails Details { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs new file mode 100644 index 000000000000..22793914b0c4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs @@ -0,0 +1,145 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Constraints for Fault Simulation action. + internal partial class FaultSimulationConstraints : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual FaultSimulationConstraints PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulationConstraints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulationConstraints IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(ExpireOn)) + { + writer.WritePropertyName("expirationTime"u8); + writer.WriteStringValue(ExpireOn.Value, "O"); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulationConstraints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual FaultSimulationConstraints JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationConstraints(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FaultSimulationConstraints DeserializeFaultSimulationConstraints(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expireOn = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("expirationTime"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expireOn = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FaultSimulationConstraints(expireOn, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs new file mode 100644 index 000000000000..7791a214f5b5 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Constraints for Fault Simulation action. + internal partial class FaultSimulationConstraints + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public FaultSimulationConstraints() + { + } + + /// Initializes a new instance of . + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationConstraints(DateTimeOffset? expireOn, IDictionary additionalBinaryDataProperties) + { + ExpireOn = expireOn; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ExpireOn { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..9b651024455d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// + /// Parameters for Fault Simulation action. + /// Please note this is the abstract base class. The derived classes available for instantiation are: . + /// + [PersistableModelProxy(typeof(UnknownFaultSimulationContent))] + public abstract partial class FaultSimulationContent : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal FaultSimulationContent() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual FaultSimulationContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{format}' format."); + } + writer.WritePropertyName("faultKind"u8); + writer.WriteStringValue(FaultKind.ToString()); + if (Optional.IsDefined(IsForced)) + { + writer.WritePropertyName("force"u8); + writer.WriteBooleanValue(IsForced.Value); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual FaultSimulationContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FaultSimulationContent DeserializeFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("faultKind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Zone": + return ZoneFaultSimulationContent.DeserializeZoneFaultSimulationContent(element, options); + } + } + return UnknownFaultSimulationContent.DeserializeUnknownFaultSimulationContent(element, options); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs new file mode 100644 index 000000000000..1931265ccbc1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// + /// Parameters for Fault Simulation action. + /// Please note this is the abstract base class. The derived classes available for instantiation are: . + /// + public abstract partial class FaultSimulationContent + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + private protected FaultSimulationContent(FaultKind faultKind) + { + FaultKind = faultKind; + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContent(FaultKind faultKind, bool? isForced, FaultSimulationConstraints constraints, IDictionary additionalBinaryDataProperties) + { + FaultKind = faultKind; + IsForced = isForced; + Constraints = constraints; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The kind of fault to be simulated. + internal FaultKind FaultKind { get; set; } + + /// Force the action to go through without any check on the cluster. + public bool? IsForced { get; set; } + + /// Constraints for Fault Simulation action. + internal FaultSimulationConstraints Constraints { get; set; } + + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ConstraintsExpireOn + { + get + { + return Constraints is null ? default : Constraints.ExpireOn; + } + set + { + if (Constraints is null) + { + Constraints = new FaultSimulationConstraints(); + } + Constraints.ExpireOn = value; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs new file mode 100644 index 000000000000..750e4575d3f0 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs @@ -0,0 +1,154 @@ +// 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; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault Simulation Request for Start action. + public partial class FaultSimulationContentWrapper : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal FaultSimulationContentWrapper() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual FaultSimulationContentWrapper PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulationContentWrapper IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(FaultSimulationContentWrapper faultSimulationContentWrapper) + { + if (faultSimulationContentWrapper == null) + { + return null; + } + return RequestContent.Create(faultSimulationContentWrapper, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support writing '{format}' format."); + } + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulationContentWrapper IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual FaultSimulationContentWrapper JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FaultSimulationContentWrapper DeserializeFaultSimulationContentWrapper(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultSimulationContent parameters = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("parameters"u8)) + { + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FaultSimulationContentWrapper(parameters, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs new file mode 100644 index 000000000000..fad8250b849f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault Simulation Request for Start action. + public partial class FaultSimulationContentWrapper + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Parameters for Fault Simulation start action. + /// is null. + public FaultSimulationContentWrapper(FaultSimulationContent parameters) + { + Argument.AssertNotNull(parameters, nameof(parameters)); + + Parameters = parameters; + } + + /// Initializes a new instance of . + /// Parameters for Fault Simulation start action. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContentWrapper(FaultSimulationContent parameters, IDictionary additionalBinaryDataProperties) + { + Parameters = parameters; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Parameters for Fault Simulation start action. + public FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs new file mode 100644 index 000000000000..c13320fb214f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs @@ -0,0 +1,192 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Details for Fault Simulation. + public partial class FaultSimulationDetails : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual FaultSimulationDetails PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(ClusterId)) + { + writer.WritePropertyName("clusterId"u8); + writer.WriteStringValue(ClusterId); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsCollectionDefined(NodeTypeFaultSimulation)) + { + writer.WritePropertyName("nodeTypeFaultSimulation"u8); + writer.WriteStartArray(); + foreach (NodeTypeFaultSimulation item in NodeTypeFaultSimulation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual FaultSimulationDetails JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationDetails(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FaultSimulationDetails DeserializeFaultSimulationDetails(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterId = default; + string operationId = default; + IList nodeTypeFaultSimulation = default; + FaultSimulationContent parameters = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("clusterId"u8)) + { + clusterId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("operationId"u8)) + { + operationId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("nodeTypeFaultSimulation"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(Models.NodeTypeFaultSimulation.DeserializeNodeTypeFaultSimulation(item, options)); + } + nodeTypeFaultSimulation = array; + continue; + } + if (prop.NameEquals("parameters"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation ?? new ChangeTrackingList(), parameters, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs new file mode 100644 index 000000000000..1f11570ed788 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Details for Fault Simulation. + public partial class FaultSimulationDetails + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal FaultSimulationDetails() + { + NodeTypeFaultSimulation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// Fault simulation parameters. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationDetails(string clusterId, string operationId, IList nodeTypeFaultSimulation, FaultSimulationContent parameters, IDictionary additionalBinaryDataProperties) + { + ClusterId = clusterId; + OperationId = operationId; + NodeTypeFaultSimulation = nodeTypeFaultSimulation; + Parameters = parameters; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// unique identifier for the cluster resource. + public string ClusterId { get; } + + /// unique identifier for the operation associated with the fault simulation. + public string OperationId { get; } + + /// List of node type simulations associated with the cluster fault simulation. + public IList NodeTypeFaultSimulation { get; } + + /// Fault simulation parameters. + public FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs new file mode 100644 index 000000000000..c19483a282d9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs @@ -0,0 +1,154 @@ +// 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; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Fault Simulation id. + public partial class FaultSimulationIdContent : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal FaultSimulationIdContent() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual FaultSimulationIdContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulationIdContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulationIdContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(FaultSimulationIdContent faultSimulationIdContent) + { + if (faultSimulationIdContent == null) + { + return null; + } + return RequestContent.Create(faultSimulationIdContent, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support writing '{format}' format."); + } + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulationIdContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual FaultSimulationIdContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationIdContent(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FaultSimulationIdContent DeserializeFaultSimulationIdContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("simulationId"u8)) + { + simulationId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FaultSimulationIdContent(simulationId, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs new file mode 100644 index 000000000000..5f98cb243972 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Fault Simulation id. + public partial class FaultSimulationIdContent + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// is null. + public FaultSimulationIdContent(string simulationId) + { + Argument.AssertNotNull(simulationId, nameof(simulationId)); + + SimulationId = simulationId; + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationIdContent(string simulationId, IDictionary additionalBinaryDataProperties) + { + SimulationId = simulationId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs new file mode 100644 index 000000000000..028651e9cebd --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs @@ -0,0 +1,176 @@ +// 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; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation list results. + internal partial class FaultSimulationListResult : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal FaultSimulationListResult() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual FaultSimulationListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static FaultSimulationListResult FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support writing '{format}' format."); + } + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (FaultSimulation 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" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual FaultSimulationListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationListResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FaultSimulationListResult DeserializeFaultSimulationListResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList value = default; + Uri nextLink = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(FaultSimulation.DeserializeFaultSimulation(item, options)); + } + value = array; + continue; + } + if (prop.NameEquals("nextLink"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString(), UriKind.RelativeOrAbsolute); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FaultSimulationListResult(value, nextLink, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs new file mode 100644 index 000000000000..fcc7e63e7d26 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs @@ -0,0 +1,44 @@ +// 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.ServiceFabricManagedClusters.Models +{ + /// Fault simulation list results. + internal partial class FaultSimulationListResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The FaultSimulation items on this page. + internal FaultSimulationListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FaultSimulation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationListResult(IList value, Uri nextLink, IDictionary additionalBinaryDataProperties) + { + Value = value; + NextLink = nextLink; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The FaultSimulation items on this page. + public IList Value { get; } + + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs new file mode 100644 index 000000000000..6fbecfbe234a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation status. + public readonly partial struct FaultSimulationStatus : IEquatable + { + private readonly string _value; + /// Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress. + private const string StartingValue = "Starting"; + /// Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully. + private const string ActiveValue = "Active"; + /// Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress. + private const string StoppingValue = "Stopping"; + /// Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully. + private const string DoneValue = "Done"; + /// Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails. + private const string StartFailedValue = "StartFailed"; + /// Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails. + private const string StopFailedValue = "StopFailed"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public FaultSimulationStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress. + public static FaultSimulationStatus Starting { get; } = new FaultSimulationStatus(StartingValue); + + /// Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully. + public static FaultSimulationStatus Active { get; } = new FaultSimulationStatus(ActiveValue); + + /// Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress. + public static FaultSimulationStatus Stopping { get; } = new FaultSimulationStatus(StoppingValue); + + /// Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully. + public static FaultSimulationStatus Done { get; } = new FaultSimulationStatus(DoneValue); + + /// Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails. + public static FaultSimulationStatus StartFailed { get; } = new FaultSimulationStatus(StartFailedValue); + + /// Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails. + public static FaultSimulationStatus StopFailed { get; } = new FaultSimulationStatus(StopFailedValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(FaultSimulationStatus left, FaultSimulationStatus right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(FaultSimulationStatus left, FaultSimulationStatus right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator FaultSimulationStatus(string value) => new FaultSimulationStatus(value); + + /// Converts a string to a . + /// The value. + public static implicit operator FaultSimulationStatus?(string value) => value == null ? null : new FaultSimulationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultSimulationStatus other && Equals(other); + + /// + public bool Equals(FaultSimulationStatus 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/HostEndpointSettings.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/HostEndpointSettings.Serialization.cs new file mode 100644 index 000000000000..05da6a806465 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/HostEndpointSettings.Serialization.cs @@ -0,0 +1,152 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Specifies particular host endpoint settings. + public partial class HostEndpointSettings : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual HostEndpointSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeHostEndpointSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HostEndpointSettings)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(HostEndpointSettings)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + HostEndpointSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HostEndpointSettings)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode); + } + if (Optional.IsDefined(InVMAccessControlProfileReferenceId)) + { + writer.WritePropertyName("inVMAccessControlProfileReferenceId"u8); + writer.WriteStringValue(InVMAccessControlProfileReferenceId); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + HostEndpointSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual HostEndpointSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HostEndpointSettings)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHostEndpointSettings(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static HostEndpointSettings DeserializeHostEndpointSettings(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string mode = default; + string inVMAccessControlProfileReferenceId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("mode"u8)) + { + mode = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("inVMAccessControlProfileReferenceId"u8)) + { + inVMAccessControlProfileReferenceId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new HostEndpointSettings(mode, inVMAccessControlProfileReferenceId, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/HostEndpointSettings.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/HostEndpointSettings.cs new file mode 100644 index 000000000000..3371d0ee561e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/HostEndpointSettings.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Specifies particular host endpoint settings. + public partial class HostEndpointSettings + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public HostEndpointSettings() + { + } + + /// Initializes a new instance of . + /// Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation. + /// Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + /// Keeps track of any properties unknown to the library. + internal HostEndpointSettings(string mode, string inVMAccessControlProfileReferenceId, IDictionary additionalBinaryDataProperties) + { + Mode = mode; + InVMAccessControlProfileReferenceId = inVMAccessControlProfileReferenceId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial entries in the logs but it does not actually deny any requests to host endpoints. In Enforce mode, the system will enforce the access control and it is the recommended mode of operation. + public string Mode { get; set; } + + /// Specifies the InVMAccessControlProfileVersion resource id in the format of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + public string InVMAccessControlProfileReferenceId { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs new file mode 100644 index 000000000000..f2166a973941 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs @@ -0,0 +1,182 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Node type fault simulation object with status. + public partial class NodeTypeFaultSimulation : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual NodeTypeFaultSimulation PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + NodeTypeFaultSimulation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(NodeTypeName)) + { + writer.WritePropertyName("nodeTypeName"u8); + writer.WriteStringValue(NodeTypeName); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsDefined(OperationStatus)) + { + writer.WritePropertyName("operationStatus"u8); + writer.WriteStringValue(OperationStatus.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + NodeTypeFaultSimulation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual NodeTypeFaultSimulation JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static NodeTypeFaultSimulation DeserializeNodeTypeFaultSimulation(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nodeTypeName = default; + FaultSimulationStatus? status = default; + string operationId = default; + SfmcOperationStatus? operationStatus = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("nodeTypeName"u8)) + { + nodeTypeName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("operationId"u8)) + { + operationId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("operationStatus"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationStatus = new SfmcOperationStatus(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs new file mode 100644 index 000000000000..103fe55e5d3e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Node type fault simulation object with status. + public partial class NodeTypeFaultSimulation + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal NodeTypeFaultSimulation() + { + } + + /// Initializes a new instance of . + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// Keeps track of any properties unknown to the library. + internal NodeTypeFaultSimulation(string nodeTypeName, FaultSimulationStatus? status, string operationId, SfmcOperationStatus? operationStatus, IDictionary additionalBinaryDataProperties) + { + NodeTypeName = nodeTypeName; + Status = status; + OperationId = operationId; + OperationStatus = operationStatus; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Node type name. + public string NodeTypeName { get; } + + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + + /// Current or latest asynchronous operation identifier on the node type. + public string OperationId { get; } + + /// Current or latest asynchronous operation status on the node type. + public SfmcOperationStatus? OperationStatus { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ProxyAgentSettings.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ProxyAgentSettings.Serialization.cs new file mode 100644 index 000000000000..3fbad04381ae --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ProxyAgentSettings.Serialization.cs @@ -0,0 +1,211 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Specifies ProxyAgent settings for the virtual machine or virtual machine scale set. + public partial class ProxyAgentSettings : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ProxyAgentSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeProxyAgentSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProxyAgentSettings)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ProxyAgentSettings)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ProxyAgentSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProxyAgentSettings)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Enabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled.Value); + } + if (Optional.IsDefined(KeyIncarnationId)) + { + writer.WritePropertyName("keyIncarnationId"u8); + writer.WriteNumberValue(KeyIncarnationId.Value); + } + if (Optional.IsDefined(WireServer)) + { + writer.WritePropertyName("wireServer"u8); + writer.WriteObjectValue(WireServer, options); + } + if (Optional.IsDefined(Imds)) + { + writer.WritePropertyName("imds"u8); + writer.WriteObjectValue(Imds, options); + } + if (Optional.IsDefined(AddProxyAgentExtension)) + { + writer.WritePropertyName("addProxyAgentExtension"u8); + writer.WriteBooleanValue(AddProxyAgentExtension.Value); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ProxyAgentSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ProxyAgentSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProxyAgentSettings)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProxyAgentSettings(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ProxyAgentSettings DeserializeProxyAgentSettings(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + int? keyIncarnationId = default; + HostEndpointSettings wireServer = default; + HostEndpointSettings imds = default; + bool? addProxyAgentExtension = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("enabled"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("keyIncarnationId"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyIncarnationId = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("wireServer"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + wireServer = HostEndpointSettings.DeserializeHostEndpointSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("imds"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imds = HostEndpointSettings.DeserializeHostEndpointSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("addProxyAgentExtension"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addProxyAgentExtension = prop.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ProxyAgentSettings( + enabled, + keyIncarnationId, + wireServer, + imds, + addProxyAgentExtension, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ProxyAgentSettings.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ProxyAgentSettings.cs new file mode 100644 index 000000000000..486411291d74 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ProxyAgentSettings.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Specifies ProxyAgent settings for the virtual machine or virtual machine scale set. + public partial class ProxyAgentSettings + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ProxyAgentSettings() + { + } + + /// Initializes a new instance of . + /// Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set. + /// Increasing the value of this property allows users to reset the key used for securing communication channel between guest and host. + /// Specifies the Wire Server endpoint settings while creating the virtual machine or virtual machine scale set. + /// Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine scale set. + /// Specify whether to implicitly install the ProxyAgent Extension. This option is currently applicable only for Linux Os. + /// Keeps track of any properties unknown to the library. + internal ProxyAgentSettings(bool? enabled, int? keyIncarnationId, HostEndpointSettings wireServer, HostEndpointSettings imds, bool? addProxyAgentExtension, IDictionary additionalBinaryDataProperties) + { + Enabled = enabled; + KeyIncarnationId = keyIncarnationId; + WireServer = wireServer; + Imds = imds; + AddProxyAgentExtension = addProxyAgentExtension; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set. + public bool? Enabled { get; set; } + + /// Increasing the value of this property allows users to reset the key used for securing communication channel between guest and host. + public int? KeyIncarnationId { get; set; } + + /// Specifies the Wire Server endpoint settings while creating the virtual machine or virtual machine scale set. + public HostEndpointSettings WireServer { get; set; } + + /// Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine scale set. + public HostEndpointSettings Imds { get; set; } + + /// Specify whether to implicitly install the ProxyAgent Extension. This option is currently applicable only for Linux Os. + public bool? AddProxyAgentExtension { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicy.Serialization.cs new file mode 100644 index 000000000000..1c491f886ccc --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicy.Serialization.cs @@ -0,0 +1,145 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Scale in policy for a node type. This is used to specify the mode for scale in operations on a node type. + internal partial class ScaleInPolicy : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ScaleInPolicy PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeScaleInPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScaleInPolicy)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ScaleInPolicy)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ScaleInPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScaleInPolicy)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ScaleInPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ScaleInPolicy JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScaleInPolicy)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScaleInPolicy(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ScaleInPolicy DeserializeScaleInPolicy(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScaleInPolicyMode? mode = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("mode"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new ScaleInPolicyMode(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ScaleInPolicy(mode, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicy.cs new file mode 100644 index 000000000000..884ce774407b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicy.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Scale in policy for a node type. This is used to specify the mode for scale in operations on a node type. + internal partial class ScaleInPolicy + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ScaleInPolicy() + { + } + + /// Initializes a new instance of . + /// The scale in policy mode for a node type. + /// Keeps track of any properties unknown to the library. + internal ScaleInPolicy(ScaleInPolicyMode? mode, IDictionary additionalBinaryDataProperties) + { + Mode = mode; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The scale in policy mode for a node type. + public ScaleInPolicyMode? Mode { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicyMode.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicyMode.cs new file mode 100644 index 000000000000..66a87c02eec7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ScaleInPolicyMode.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Specifies the scale in policy mode for a node type. + public readonly partial struct ScaleInPolicyMode : IEquatable + { + private readonly string _value; + /// Default scale in policy mode where the system will choose which nodes to remove when scaling in. + private const string DefaultValue = "Default"; + /// OldestNodeFirst scale in policy mode where the oldest node in the node type will be removed first when scaling in. + private const string OldestNodeFirstValue = "OldestNodeFirst"; + /// NewestNodeFirst scale in policy mode where the newest node in the node type will be removed first when scaling in. + private const string NewestNodeFirstValue = "NewestNodeFirst"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public ScaleInPolicyMode(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Default scale in policy mode where the system will choose which nodes to remove when scaling in. + public static ScaleInPolicyMode Default { get; } = new ScaleInPolicyMode(DefaultValue); + + /// OldestNodeFirst scale in policy mode where the oldest node in the node type will be removed first when scaling in. + public static ScaleInPolicyMode OldestNodeFirst { get; } = new ScaleInPolicyMode(OldestNodeFirstValue); + + /// NewestNodeFirst scale in policy mode where the newest node in the node type will be removed first when scaling in. + public static ScaleInPolicyMode NewestNodeFirst { get; } = new ScaleInPolicyMode(NewestNodeFirstValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(ScaleInPolicyMode left, ScaleInPolicyMode right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(ScaleInPolicyMode left, ScaleInPolicyMode right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator ScaleInPolicyMode(string value) => new ScaleInPolicyMode(value); + + /// Converts a string to a . + /// The value. + public static implicit operator ScaleInPolicyMode?(string value) => value == null ? null : new ScaleInPolicyMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScaleInPolicyMode other && Equals(other); + + /// + public bool Equals(ScaleInPolicyMode 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.Serialization.cs index 62153f78385d..e9878b72b30d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.Serialization.cs @@ -421,6 +421,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("enableResilientEphemeralOsDisk"u8); writer.WriteBooleanValue(EnableResilientEphemeralOsDisk.Value); } + if (Optional.IsDefined(ScaleInPolicy)) + { + writer.WritePropertyName("scaleInPolicy"u8); + writer.WriteObjectValue(ScaleInPolicy, options); + } + if (Optional.IsDefined(ProxyAgentSettings)) + { + writer.WritePropertyName("proxyAgentSettings"u8); + writer.WriteObjectValue(ProxyAgentSettings, options); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -517,6 +527,8 @@ internal static ServiceFabricManagedNodeTypeProperties DeserializeServiceFabricM bool? isZoneBalanceEnabled = default; bool? isOutboundOnly = default; bool? enableResilientEphemeralOsDisk = default; + ScaleInPolicy scaleInPolicy = default; + ProxyAgentSettings proxyAgentSettings = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -1043,6 +1055,24 @@ internal static ServiceFabricManagedNodeTypeProperties DeserializeServiceFabricM enableResilientEphemeralOsDisk = prop.Value.GetBoolean(); continue; } + if (prop.NameEquals("scaleInPolicy"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scaleInPolicy = ScaleInPolicy.DeserializeScaleInPolicy(prop.Value, options); + continue; + } + if (prop.NameEquals("proxyAgentSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + proxyAgentSettings = ProxyAgentSettings.DeserializeProxyAgentSettings(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -1103,6 +1133,8 @@ internal static ServiceFabricManagedNodeTypeProperties DeserializeServiceFabricM isZoneBalanceEnabled, isOutboundOnly, enableResilientEphemeralOsDisk, + scaleInPolicy, + proxyAgentSettings, additionalBinaryDataProperties); } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.cs index 18d3c15518c1..317b002427b3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypeProperties.cs @@ -94,8 +94,10 @@ public ServiceFabricManagedNodeTypeProperties(bool isPrimary, int vmInstanceCoun /// Setting this to true allows stateless node types to scale out without equal distribution across zones. /// Specifies the node type should be configured for only outbound traffic and not inbound traffic. /// Specifies whether the node type should use a resilient ephemeral OS disk when using a supported SKU size. A resilient ephemeral OS disk provides improved reliability for ephemeral OS disks by enabling full caching. + /// Specifies the scale in policy for the node type, which will be used when scale in happens on the cluster. If not specified, the default is Default which means the platform will decide which nodes to remove during scale in. + /// Specifies the settings for the proxy agent on the node type. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedNodeTypeProperties(bool isPrimary, int vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, NodeTypeSecurityEncryptionType? securityEncryptionType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, bool? isZoneBalanceEnabled, bool? isOutboundOnly, bool? enableResilientEphemeralOsDisk, IDictionary additionalBinaryDataProperties) + internal ServiceFabricManagedNodeTypeProperties(bool isPrimary, int vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, NodeTypeSecurityEncryptionType? securityEncryptionType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, bool? isZoneBalanceEnabled, bool? isOutboundOnly, bool? enableResilientEphemeralOsDisk, ScaleInPolicy scaleInPolicy, ProxyAgentSettings proxyAgentSettings, IDictionary additionalBinaryDataProperties) { IsPrimary = isPrimary; VmInstanceCount = vmInstanceCount; @@ -151,6 +153,8 @@ internal ServiceFabricManagedNodeTypeProperties(bool isPrimary, int vmInstanceCo IsZoneBalanceEnabled = isZoneBalanceEnabled; IsOutboundOnly = isOutboundOnly; EnableResilientEphemeralOsDisk = enableResilientEphemeralOsDisk; + ScaleInPolicy = scaleInPolicy; + ProxyAgentSettings = proxyAgentSettings; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -316,6 +320,12 @@ internal ServiceFabricManagedNodeTypeProperties(bool isPrimary, int vmInstanceCo /// Specifies whether the node type should use a resilient ephemeral OS disk when using a supported SKU size. A resilient ephemeral OS disk provides improved reliability for ephemeral OS disks by enabling full caching. public bool? EnableResilientEphemeralOsDisk { get; set; } + /// Specifies the scale in policy for the node type, which will be used when scale in happens on the cluster. If not specified, the default is Default which means the platform will decide which nodes to remove during scale in. + internal ScaleInPolicy ScaleInPolicy { get; set; } + + /// Specifies the settings for the proxy agent on the node type. + public ProxyAgentSettings ProxyAgentSettings { get; set; } + /// The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. public IList VmManagedIdentityUserAssignedIdentities { @@ -328,5 +338,22 @@ public IList VmManagedIdentityUserAssignedIdentities return VmManagedIdentity.UserAssignedIdentities; } } + + /// The scale in policy mode for a node type. + public ScaleInPolicyMode? ScaleInMode + { + get + { + return ScaleInPolicy is null ? default : ScaleInPolicy.Mode; + } + set + { + if (ScaleInPolicy is null) + { + ScaleInPolicy = new ScaleInPolicy(); + } + ScaleInPolicy.Mode = value; + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs new file mode 100644 index 000000000000..b82c56898025 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Sfmc operation status. + public readonly partial struct SfmcOperationStatus : IEquatable + { + private readonly string _value; + /// Operation created. + private const string CreatedValue = "Created"; + /// Operation started. + private const string StartedValue = "Started"; + /// Operation succeeded. + private const string SucceededValue = "Succeeded"; + /// Operation failed. + private const string FailedValue = "Failed"; + /// Operation aborted. + private const string AbortedValue = "Aborted"; + /// Operation canceled. + private const string CanceledValue = "Canceled"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public SfmcOperationStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Operation created. + public static SfmcOperationStatus Created { get; } = new SfmcOperationStatus(CreatedValue); + + /// Operation started. + public static SfmcOperationStatus Started { get; } = new SfmcOperationStatus(StartedValue); + + /// Operation succeeded. + public static SfmcOperationStatus Succeeded { get; } = new SfmcOperationStatus(SucceededValue); + + /// Operation failed. + public static SfmcOperationStatus Failed { get; } = new SfmcOperationStatus(FailedValue); + + /// Operation aborted. + public static SfmcOperationStatus Aborted { get; } = new SfmcOperationStatus(AbortedValue); + + /// Operation canceled. + public static SfmcOperationStatus Canceled { get; } = new SfmcOperationStatus(CanceledValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(SfmcOperationStatus left, SfmcOperationStatus right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(SfmcOperationStatus left, SfmcOperationStatus right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator SfmcOperationStatus(string value) => new SfmcOperationStatus(value); + + /// Converts a string to a . + /// The value. + public static implicit operator SfmcOperationStatus?(string value) => value == null ? null : new SfmcOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SfmcOperationStatus other && Equals(other); + + /// + public bool Equals(SfmcOperationStatus 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..d6441ba2ffb4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs @@ -0,0 +1,146 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + internal partial class UnknownFaultSimulationContent : FaultSimulationContent, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownFaultSimulationContent() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override FaultSimulationContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FaultSimulationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + FaultSimulationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override FaultSimulationContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownFaultSimulationContent DeserializeUnknownFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultKind faultKind = default; + bool? isForced = default; + FaultSimulationConstraints constraints = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("force"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isForced = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("constraints"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownFaultSimulationContent(faultKind, isForced, constraints, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs new file mode 100644 index 000000000000..99557dd0772c --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + internal partial class UnknownFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal UnknownFaultSimulationContent(FaultKind faultKind, bool? isForced, FaultSimulationConstraints constraints, IDictionary additionalBinaryDataProperties) : base(faultKind != default ? faultKind : "unknown", isForced, constraints, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..d7560d070a5a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs @@ -0,0 +1,179 @@ +// 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.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Zone Fault Simulation action. + public partial class ZoneFaultSimulationContent : FaultSimulationContent, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override FaultSimulationContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ZoneFaultSimulationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ZoneFaultSimulationContent)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + 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) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (string item in Zones) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ZoneFaultSimulationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ZoneFaultSimulationContent)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override FaultSimulationContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ZoneFaultSimulationContent DeserializeZoneFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultKind faultKind = default; + bool? isForced = default; + FaultSimulationConstraints constraints = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IList zones = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("force"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isForced = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("constraints"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(prop.Value, options); + continue; + } + if (prop.NameEquals("zones"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + zones = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ZoneFaultSimulationContent(faultKind, isForced, constraints, additionalBinaryDataProperties, zones ?? new ChangeTrackingList()); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs new file mode 100644 index 000000000000..229f531cbc9a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.ServiceFabricManagedClusters; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Zone Fault Simulation action. + public partial class ZoneFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + public ZoneFaultSimulationContent() : base(FaultKind.Zone) + { + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + /// Indicates the zones of the fault simulation. + internal ZoneFaultSimulationContent(FaultKind faultKind, bool? isForced, FaultSimulationConstraints constraints, IDictionary additionalBinaryDataProperties, IList zones) : base(faultKind, isForced, constraints, additionalBinaryDataProperties) + { + Zones = zones; + } + + /// Indicates the zones of the fault simulation. + public IList Zones { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs index f3136fc2e342..c3df9956f943 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs @@ -41,7 +41,7 @@ internal ManagedApplyMaintenanceWindow(ClientDiagnostics clientDiagnostics, Http /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } - internal HttpMessage CreatePostManagedApplyMaintenanceWindowRequest(string subscriptionId, string resourceGroupName, string clusterName, RequestContext context) + internal HttpMessage CreatePostManagedApplyMaintenanceWindowRequest(string subscriptionId, string resourceGroupName, string clusterName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -60,6 +60,11 @@ internal HttpMessage CreatePostManagedApplyMaintenanceWindowRequest(string subsc Request request = message.Request; request.Uri = uri; request.Method = RequestMethod.Post; + if (content != null) + { + request.Headers.SetValue("Content-Type", "application/json"); + } + request.Content = content; return message; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs index b8dcb540baf9..4ed92e39facc 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs @@ -217,5 +217,124 @@ internal HttpMessage CreateNextGetBySubscriptionRequest(Uri nextPage, string sub request.Headers.SetValue("Accept", "application/json"); return message; } + + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/getFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/listFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateNextGetFaultSimulationRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string clusterName, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + if (nextPage.IsAbsoluteUri) + { + uri.Reset(nextPage); + } + else + { + uri.Reset(new Uri(_endpoint, nextPage)); + } + if (_apiVersion != null) + { + uri.UpdateQuery("api-version", _apiVersion); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/startFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/stopFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; + return message; + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs index 45fb10ada791..f8277b6eab40 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs @@ -341,5 +341,132 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr request.Content = content; return message; } + + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/startFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/stopFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/getFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, RequestContext context) + { + RawRequestUriBuilder 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/listFaultSimulation", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateNextGetFaultSimulationRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + if (nextPage.IsAbsoluteUri) + { + uri.Reset(nextPage); + } + else + { + uri.Reset(new Uri(_endpoint, nextPage)); + } + if (_apiVersion != null) + { + uri.UpdateQuery("api-version", _apiVersion); + } + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Accept", "application/json"); + return message; + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs index 1c08028b5c24..2f38ae524992 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs @@ -40,7 +40,7 @@ internal ServiceFabricManagedApplicationCollection(ArmClient client, ResourceIde { TryGetApiVersion(ServiceFabricManagedApplicationResource.ResourceType, out string serviceFabricManagedApplicationApiVersion); _applicationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedApplicationResource.ResourceType.Namespace, Diagnostics); - _applicationsRestClient = new Applications(_applicationsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationApiVersion ?? "2026-02-01"); + _applicationsRestClient = new Applications(_applicationsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -125,7 +125,7 @@ public virtual async Task> /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -183,7 +183,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -232,7 +232,7 @@ public virtual async Task> Get /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -281,7 +281,7 @@ public virtual Response Get(string appl /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -315,7 +315,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -349,7 +349,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -406,7 +406,7 @@ public virtual async Task> ExistsAsync(string applicationName, Ca /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -463,7 +463,7 @@ public virtual Response Exists(string applicationName, CancellationToken c /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -524,7 +524,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs index 11ee0ef88875..0f9f3d6b6718 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs @@ -53,7 +53,7 @@ internal ServiceFabricManagedApplicationResource(ArmClient client, ResourceIdent { TryGetApiVersion(ResourceType, out string serviceFabricManagedApplicationApiVersion); _applicationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _applicationsRestClient = new Applications(_applicationsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationApiVersion ?? "2026-02-01"); + _applicationsRestClient = new Applications(_applicationsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -155,7 +155,7 @@ public virtual async Task> Get /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -203,7 +203,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -262,7 +262,7 @@ public virtual async Task> /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -321,7 +321,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -370,7 +370,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -419,7 +419,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -472,7 +472,7 @@ public virtual async Task FetchHealthAsync(WaitUntil waitUntil, Ap /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -525,7 +525,7 @@ public virtual ArmOperation FetchHealth(WaitUntil waitUntil, ApplicationFetchHea /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -574,7 +574,7 @@ public virtual async Task ReadUpgradeAsync(WaitUntil waitUntil, Ca /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -623,7 +623,7 @@ public virtual ArmOperation ReadUpgrade(WaitUntil waitUntil, CancellationToken c /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -676,7 +676,7 @@ public virtual async Task RestartDeployedCodePackageAsync(WaitUnti /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -729,7 +729,7 @@ public virtual ArmOperation RestartDeployedCodePackage(WaitUntil waitUntil, Rest /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -782,7 +782,7 @@ public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -835,7 +835,7 @@ public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeAppl /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -884,7 +884,7 @@ public virtual async Task StartRollbackAsync(WaitUntil waitUntil, /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -933,7 +933,7 @@ public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -986,7 +986,7 @@ public virtual async Task UpdateUpgradeAsync(WaitUntil waitUntil, /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs index 7b281afc0f25..463ad5aabda2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs @@ -40,7 +40,7 @@ internal ServiceFabricManagedApplicationTypeCollection(ArmClient client, Resourc { TryGetApiVersion(ServiceFabricManagedApplicationTypeResource.ResourceType, out string serviceFabricManagedApplicationTypeApiVersion); _applicationTypesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedApplicationTypeResource.ResourceType.Namespace, Diagnostics); - _applicationTypesRestClient = new ApplicationTypes(_applicationTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeApiVersion ?? "2026-02-01"); + _applicationTypesRestClient = new ApplicationTypes(_applicationTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -122,7 +122,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -177,7 +177,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -226,7 +226,7 @@ public virtual async Task> /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -275,7 +275,7 @@ public virtual Response Get(string /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -309,7 +309,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -343,7 +343,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -400,7 +400,7 @@ public virtual async Task> ExistsAsync(string applicationTypeName /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -457,7 +457,7 @@ public virtual Response Exists(string applicationTypeName, CancellationTok /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -518,7 +518,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs index 24b5680160df..1c8b8b96c70d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs @@ -53,7 +53,7 @@ internal ServiceFabricManagedApplicationTypeResource(ArmClient client, ResourceI { TryGetApiVersion(ResourceType, out string serviceFabricManagedApplicationTypeApiVersion); _applicationTypesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _applicationTypesRestClient = new ApplicationTypes(_applicationTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeApiVersion ?? "2026-02-01"); + _applicationTypesRestClient = new ApplicationTypes(_applicationTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -155,7 +155,7 @@ public virtual async Task> /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -203,7 +203,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -255,7 +255,7 @@ public virtual async Task> /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -307,7 +307,7 @@ public virtual Response Update(Serv /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -356,7 +356,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs index 76e1672cc193..c598d079aa88 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs @@ -40,7 +40,7 @@ internal ServiceFabricManagedApplicationTypeVersionCollection(ArmClient client, { TryGetApiVersion(ServiceFabricManagedApplicationTypeVersionResource.ResourceType, out string serviceFabricManagedApplicationTypeVersionApiVersion); _applicationTypeVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedApplicationTypeVersionResource.ResourceType.Namespace, Diagnostics); - _applicationTypeVersionsRestClient = new ApplicationTypeVersions(_applicationTypeVersionsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeVersionApiVersion ?? "2026-02-01"); + _applicationTypeVersionsRestClient = new ApplicationTypeVersions(_applicationTypeVersionsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeVersionApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -125,7 +125,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -183,7 +183,7 @@ public virtual ArmOperation /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -232,7 +232,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -281,7 +281,7 @@ public virtual Response Get( /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -316,7 +316,7 @@ public virtual AsyncPageable /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -351,7 +351,7 @@ public virtual Pageable GetA /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -408,7 +408,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -465,7 +465,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -526,7 +526,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs index 757de2c20f40..3cf520a6f9a2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs @@ -53,7 +53,7 @@ internal ServiceFabricManagedApplicationTypeVersionResource(ArmClient client, Re { TryGetApiVersion(ResourceType, out string serviceFabricManagedApplicationTypeVersionApiVersion); _applicationTypeVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _applicationTypeVersionsRestClient = new ApplicationTypeVersions(_applicationTypeVersionsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeVersionApiVersion ?? "2026-02-01"); + _applicationTypeVersionsRestClient = new ApplicationTypeVersions(_applicationTypeVersionsClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedApplicationTypeVersionApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -156,7 +156,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -204,7 +204,7 @@ public virtual Response Get( /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -256,7 +256,7 @@ public virtual async Task /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -308,7 +308,7 @@ public virtual Response Upda /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -357,7 +357,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs index f48a347da4ea..644fafe552c1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs @@ -41,7 +41,7 @@ internal ServiceFabricManagedClusterCollection(ArmClient client, ResourceIdentif { TryGetApiVersion(ServiceFabricManagedClusterResource.ResourceType, out string serviceFabricManagedClusterApiVersion); _managedClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedClusterResource.ResourceType.Namespace, Diagnostics); - _managedClustersRestClient = new ManagedClusters(_managedClustersClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-02-01"); + _managedClustersRestClient = new ManagedClusters(_managedClustersClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -126,7 +126,7 @@ public virtual async Task> Cre /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -184,7 +184,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -233,7 +233,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -282,7 +282,7 @@ public virtual Response Get(string clusterN /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -310,7 +310,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -338,7 +338,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -395,7 +395,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -452,7 +452,7 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -513,7 +513,7 @@ public virtual async Task> /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs index ee280c812a51..5fb5e9bd7235 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs @@ -59,13 +59,13 @@ internal ServiceFabricManagedClusterResource(ArmClient client, ResourceIdentifie { TryGetApiVersion(ResourceType, out string serviceFabricManagedClusterApiVersion); _managedClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _managedClustersRestClient = new ManagedClusters(_managedClustersClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-02-01"); + _managedClustersRestClient = new ManagedClusters(_managedClustersClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-05-01-preview"); _managedApplyMaintenanceWindowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _managedApplyMaintenanceWindowRestClient = new ManagedApplyMaintenanceWindow(_managedApplyMaintenanceWindowClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-02-01"); + _managedApplyMaintenanceWindowRestClient = new ManagedApplyMaintenanceWindow(_managedApplyMaintenanceWindowClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-05-01-preview"); _managedAzResiliencyStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _managedAzResiliencyStatusRestClient = new ManagedAzResiliencyStatus(_managedAzResiliencyStatusClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-02-01"); + _managedAzResiliencyStatusRestClient = new ManagedAzResiliencyStatus(_managedAzResiliencyStatusClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-05-01-preview"); _managedMaintenanceWindowStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatus(_managedMaintenanceWindowStatusClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-02-01"); + _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatus(_managedMaintenanceWindowStatusClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedClusterApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -118,7 +118,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -166,7 +166,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -214,7 +214,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -273,7 +273,7 @@ public virtual async Task> Upd /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -332,7 +332,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -381,7 +381,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -418,7 +418,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. + /// Action to Apply Maintenance window on the Service Fabric Managed Clusters. Any pending update will be applied. /// /// /// Request Path. @@ -430,7 +430,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -438,8 +438,9 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// + /// The content of the action request. /// The cancellation token to use. - public virtual async Task PostManagedApplyMaintenanceWindowAsync(CancellationToken cancellationToken = default) + public virtual async Task PostManagedApplyMaintenanceWindowAsync(ApplyMaintenanceWindowRequest content = default, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _managedApplyMaintenanceWindowClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.PostManagedApplyMaintenanceWindow"); scope.Start(); @@ -449,7 +450,7 @@ public virtual async Task PostManagedApplyMaintenanceWindowAsync(Cance { CancellationToken = cancellationToken }; - HttpMessage message = _managedApplyMaintenanceWindowRestClient.CreatePostManagedApplyMaintenanceWindowRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + HttpMessage message = _managedApplyMaintenanceWindowRestClient.CreatePostManagedApplyMaintenanceWindowRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ApplyMaintenanceWindowRequest.ToRequestContent(content), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); return response; } @@ -461,7 +462,7 @@ public virtual async Task PostManagedApplyMaintenanceWindowAsync(Cance } /// - /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. + /// Action to Apply Maintenance window on the Service Fabric Managed Clusters. Any pending update will be applied. /// /// /// Request Path. @@ -473,7 +474,7 @@ public virtual async Task PostManagedApplyMaintenanceWindowAsync(Cance /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -481,8 +482,9 @@ public virtual async Task PostManagedApplyMaintenanceWindowAsync(Cance /// /// /// + /// The content of the action request. /// The cancellation token to use. - public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken cancellationToken = default) + public virtual Response PostManagedApplyMaintenanceWindow(ApplyMaintenanceWindowRequest content = default, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _managedApplyMaintenanceWindowClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.PostManagedApplyMaintenanceWindow"); scope.Start(); @@ -492,7 +494,7 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc { CancellationToken = cancellationToken }; - HttpMessage message = _managedApplyMaintenanceWindowRestClient.CreatePostManagedApplyMaintenanceWindowRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + HttpMessage message = _managedApplyMaintenanceWindowRestClient.CreatePostManagedApplyMaintenanceWindowRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ApplyMaintenanceWindowRequest.ToRequestContent(content), context); Response response = Pipeline.ProcessMessage(message, context); return response; } @@ -516,7 +518,7 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -564,7 +566,7 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -599,6 +601,422 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc } } + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_GetFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _managedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _managedClustersRestClient.CreateGetFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(FaultSimulation.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_GetFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _managedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _managedClustersRestClient.CreateGetFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(FaultSimulation.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of recent fault simulations for the cluster. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_ListFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new ManagedClustersGetFaultSimulationAsyncCollectionResultOfT( + _managedClustersRestClient, + Id.SubscriptionId, + Id.ResourceGroupName, + Id.Name, + context, + "ServiceFabricManagedClusterResource.GetFaultSimulation"); + } + + /// + /// Gets the list of recent fault simulations for the cluster. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_ListFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new ManagedClustersGetFaultSimulationCollectionResultOfT( + _managedClustersRestClient, + Id.SubscriptionId, + Id.ResourceGroupName, + Id.Name, + context, + "ServiceFabricManagedClusterResource.GetFaultSimulation"); + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_StartFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using DiagnosticScope scope = _managedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _managedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, FaultSimulationContentWrapper.ToRequestContent(faultSimulationContentWrapper), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _managedClustersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_StartFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using DiagnosticScope scope = _managedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _managedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, FaultSimulationContentWrapper.ToRequestContent(faultSimulationContentWrapper), context); + Response response = Pipeline.ProcessMessage(message, context); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _managedClustersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_StopFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _managedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _managedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _managedClustersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation. + /// + /// + /// Operation Id. + /// ManagedClusters_StopFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _managedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _managedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response response = Pipeline.ProcessMessage(message, context); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _managedClustersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. /// @@ -612,7 +1030,7 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -660,7 +1078,7 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs index 5353a6eee8f6..50e4b908f140 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs @@ -40,7 +40,7 @@ internal ServiceFabricManagedNodeTypeCollection(ArmClient client, ResourceIdenti { TryGetApiVersion(ServiceFabricManagedNodeTypeResource.ResourceType, out string serviceFabricManagedNodeTypeApiVersion); _nodeTypesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedNodeTypeResource.ResourceType.Namespace, Diagnostics); - _nodeTypesRestClient = new NodeTypes(_nodeTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedNodeTypeApiVersion ?? "2026-02-01"); + _nodeTypesRestClient = new NodeTypes(_nodeTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedNodeTypeApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -125,7 +125,7 @@ public virtual async Task> Cr /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -183,7 +183,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -232,7 +232,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -281,7 +281,7 @@ public virtual Response Get(string nodeTyp /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -315,7 +315,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -349,7 +349,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -406,7 +406,7 @@ public virtual async Task> ExistsAsync(string nodeTypeName, Cance /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -463,7 +463,7 @@ public virtual Response Exists(string nodeTypeName, CancellationToken canc /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -524,7 +524,7 @@ public virtual async Task /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs index 1c49b656c932..2c7113fa1762 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs @@ -861,5 +861,39 @@ public bool? EnableResilientEphemeralOsDisk Properties.EnableResilientEphemeralOsDisk = value; } } + + /// Specifies the settings for the proxy agent on the node type. + public ProxyAgentSettings ProxyAgentSettings + { + get + { + return Properties is null ? default : Properties.ProxyAgentSettings; + } + set + { + if (Properties is null) + { + Properties = new ServiceFabricManagedNodeTypeProperties(); + } + Properties.ProxyAgentSettings = value; + } + } + + /// The scale in policy mode for a node type. + public ScaleInPolicyMode? ScaleInMode + { + get + { + return Properties is null ? default : Properties.ScaleInMode; + } + set + { + if (Properties is null) + { + Properties = new ServiceFabricManagedNodeTypeProperties(); + } + Properties.ScaleInMode = value; + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs index dbca21c82184..97c84a7c0118 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs @@ -55,9 +55,9 @@ internal ServiceFabricManagedNodeTypeResource(ArmClient client, ResourceIdentifi { TryGetApiVersion(ResourceType, out string serviceFabricManagedNodeTypeApiVersion); _nodeTypesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _nodeTypesRestClient = new NodeTypes(_nodeTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedNodeTypeApiVersion ?? "2026-02-01"); + _nodeTypesRestClient = new NodeTypes(_nodeTypesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedNodeTypeApiVersion ?? "2026-05-01-preview"); _nodeTypeSkusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _nodeTypeSkusRestClient = new NodeTypeSkus(_nodeTypeSkusClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedNodeTypeApiVersion ?? "2026-02-01"); + _nodeTypeSkusRestClient = new NodeTypeSkus(_nodeTypeSkusClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedNodeTypeApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -111,7 +111,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -159,7 +159,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -207,7 +207,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -266,7 +266,7 @@ public virtual async Task> Up /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -325,7 +325,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -374,7 +374,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -423,7 +423,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -476,7 +476,7 @@ public virtual async Task DeallocateAsync(WaitUntil waitUntil, Nod /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -529,7 +529,7 @@ public virtual ArmOperation Deallocate(WaitUntil waitUntil, NodeTypeActionConten /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -582,7 +582,7 @@ public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, Nod /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -622,6 +622,188 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten } } + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_GetFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _nodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _nodeTypesRestClient.CreateGetFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(FaultSimulation.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_GetFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _nodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _nodeTypesRestClient.CreateGetFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(FaultSimulation.FromResponse(result), result); + if (response.Value == null) + { + throw new RequestFailedException(response.GetRawResponse()); + } + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_ListFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new NodeTypesGetFaultSimulationAsyncCollectionResultOfT( + _nodeTypesRestClient, + Id.SubscriptionId, + Id.ResourceGroupName, + Id.Parent.Name, + Id.Name, + context, + "ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_ListFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-preview. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new NodeTypesGetFaultSimulationCollectionResultOfT( + _nodeTypesRestClient, + Id.SubscriptionId, + Id.ResourceGroupName, + Id.Parent.Name, + Id.Name, + context, + "ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + } + /// /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. /// @@ -635,7 +817,7 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -688,7 +870,7 @@ public virtual async Task RedeployAsync(WaitUntil waitUntil, NodeT /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -741,7 +923,7 @@ public virtual ArmOperation Redeploy(WaitUntil waitUntil, NodeTypeActionContent /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -794,7 +976,7 @@ public virtual async Task ReimageAsync(WaitUntil waitUntil, NodeTy /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -847,7 +1029,7 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, NodeTypeActionContent c /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -900,7 +1082,7 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTy /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -953,7 +1135,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent c /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -1006,7 +1188,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, NodeType /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -1046,6 +1228,242 @@ public virtual ArmOperation Start(WaitUntil waitUntil, NodeTypeActionContent con } } + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_StartFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using DiagnosticScope scope = _nodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _nodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, FaultSimulationContentWrapper.ToRequestContent(faultSimulationContentWrapper), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _nodeTypesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_StartFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using DiagnosticScope scope = _nodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _nodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, FaultSimulationContentWrapper.ToRequestContent(faultSimulationContentWrapper), context); + Response response = Pipeline.ProcessMessage(message, context); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _nodeTypesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_StopFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _nodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _nodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _nodeTypesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation. + /// + /// + /// Operation Id. + /// NodeTypes_StopFaultSimulation. + /// + /// + /// Default Api Version. + /// 2026-05-01-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using DiagnosticScope scope = _nodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _nodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, FaultSimulationIdContent.ToRequestContent(content), context); + Response response = Pipeline.ProcessMessage(message, context); + ServiceFabricManagedClustersArmOperation operation = new ServiceFabricManagedClustersArmOperation( + new FaultSimulationOperationSource(), + _nodeTypesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Get a Service Fabric node type supported SKUs. /// @@ -1059,7 +1477,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, NodeTypeActionContent con /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -1098,7 +1516,7 @@ public virtual AsyncPageable GetAvailableSkusAsync(Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs index ffe7fbff6ec3..532d2d722e8c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs @@ -40,7 +40,7 @@ internal ServiceFabricManagedServiceCollection(ArmClient client, ResourceIdentif { TryGetApiVersion(ServiceFabricManagedServiceResource.ResourceType, out string serviceFabricManagedServiceApiVersion); _servicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedServiceResource.ResourceType.Namespace, Diagnostics); - _servicesRestClient = new Services(_servicesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedServiceApiVersion ?? "2026-02-01"); + _servicesRestClient = new Services(_servicesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedServiceApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -125,7 +125,7 @@ public virtual async Task> Cre /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -183,7 +183,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -232,7 +232,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -281,7 +281,7 @@ public virtual Response Get(string serviceN /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -316,7 +316,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -351,7 +351,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -408,7 +408,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -465,7 +465,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// @@ -526,7 +526,7 @@ public virtual async Task> /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs index b7802136cf2c..ddc9323a8fea 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs @@ -53,7 +53,7 @@ internal ServiceFabricManagedServiceResource(ArmClient client, ResourceIdentifie { TryGetApiVersion(ResourceType, out string serviceFabricManagedServiceApiVersion); _servicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ResourceType.Namespace, Diagnostics); - _servicesRestClient = new Services(_servicesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedServiceApiVersion ?? "2026-02-01"); + _servicesRestClient = new Services(_servicesClientDiagnostics, Pipeline, Endpoint, serviceFabricManagedServiceApiVersion ?? "2026-05-01-preview"); ValidateResourceId(id); } @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -156,7 +156,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -204,7 +204,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -256,7 +256,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -308,7 +308,7 @@ public virtual Response Update(ServiceFabri /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -357,7 +357,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -406,7 +406,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. @@ -459,7 +459,7 @@ public virtual async Task RestartReplicaAsync(WaitUntil waitUntil, /// /// /// Default Api Version. - /// 2026-02-01. + /// 2026-05-01-preview. /// /// /// Resource. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml index f751f83f8ded..157a0a7e8fa2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -1,6 +1,6 @@ directory: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/ServiceFabricManagedClusters -commit: b6df04b2856ad2378a7239e64d8f4ff73d52b81d +commit: cfd58963682948f5242b945bc6152c4e54c88c0c repo: Azure/azure-rest-api-specs additionalDirectories: -emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json +emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json \ No newline at end of file